Go to advanced search

by Mike_at_no27
Fri Jan 22, 2016 2:44 pm
Forum: Other programming languages
Topic: Bash script will not exit
Replies: 3
Views: 1133

Re: Bash script will not exit

#!/bin/bash TMPFILE=/tmp/epochtimetesfile.txt sleep 1 TIMEBEFORE=$( head $TMPFILE -n1 ) CURRDATE=`(date +'%Y-%m-%d %H:%M:%S UTC')` EPOCHTIME=`(date --date="$CURRDATE" +%s)` DIFFTIME=$(( $EPOCHTIME - $TIMEBEFORE )) if [[ "$DIFFTIME" -lt "60" ]] then echo "START AGAIN , DIFF IS TOO SMALL" else echo "$...

Go to advanced search