At a random time within the specified interval a duck will appear in your terminal and you press ENTER to catch it.

Björn Wärmedal 01782054a9 Flushing stdin before releasing new duck 3 years ago
README.md b564eb7a78 Updated README 3 years ago
termduck.sh 01782054a9 Flushing stdin before releasing new duck 3 years ago

README.md

Terminal Duck Hunt

Usage:

./termduck.sh [seconds in interval, default 90]

At a random time within the specified interval a duck will appear in your terminal and you press ENTER to catch it. The real challenge is having it running in a terminal window while you're doing other things!

Example:

$ ./termduck.sh 300
Catch the duckies! When a duck appears, press ENTER as fast as possible.
Aim for a low average time to capture. Ctrl+C to quit.

  -._.-._.-. \_o< --QUACK!

Yay you caught it in 947 seconds! You've caught 1 ducks at an average time of 947.0 seconds.

  -._.-._.-. \_o< --QUACK!

Yay you caught it in 5925 seconds! You've caught 2 ducks at an average time of 3436.0 seconds.