Created
November 13, 2016 08:43
-
-
Save yinyin/8ddac8af85085893afd3052996e9bf28 to your computer and use it in GitHub Desktop.
Print a fixed text and current time every 3 seconds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while true; do | |
echo "Press [CTRL+C] to stop.." | |
/bin/date | |
sleep 3 | |
if [ "$?" == "1" ]; then | |
break | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment