You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

clock.sh 389B

1234567891011121314
  1. #!/bin/bash
  2. RED='\033[0;31m'
  3. NC='\033[0m' # No Color
  4. echo "start the clock"
  5. while [ ! -f stop ]; do
  6. #echo "File not found!"
  7. seconds=60; date1=$((`date +%s` + $seconds));
  8. while [ "$date1" -ge `date +%s` ]; do
  9. #echo -ne "$(date -u --date @$(($date1 - `date +%s` )) +%H:%M:%S)\r"; > /dev/null
  10. : #busy wait
  11. done
  12. printf "${RED}############# `date` ############${NC}\n"
  13. done