Skip to content

Instantly share code, notes, and snippets.

@yinyin
Created November 13, 2016 08:43
Show Gist options
  • Save yinyin/8ddac8af85085893afd3052996e9bf28 to your computer and use it in GitHub Desktop.
Save yinyin/8ddac8af85085893afd3052996e9bf28 to your computer and use it in GitHub Desktop.
Print a fixed text and current time every 3 seconds
#!/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