![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Date comparison with 'string date having slashes and time zone' in Bash only | TariqYousaf | Homework & Coursework Questions | 1 | 10-08-2009 01:27 PM |
| Plz correct my syntax of shell script | girish.batra | Shell Programming and Scripting | 2 | 06-06-2008 06:36 AM |
| Check for the correct date format in UNIx | rawatds | Shell Programming and Scripting | 1 | 07-13-2006 06:24 AM |
| correct syntax for using "grep regex filename" ? | yongho | UNIX for Dummies Questions & Answers | 2 | 06-13-2005 02:44 PM |
| Correct Syntax For Calling Shell Script in Perl Module | mh53j_fe | Shell Programming and Scripting | 4 | 06-08-2005 10:42 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
if [ $NOWDATE -gt $STARTDATE ] , date comparison correct syntax?
i've looked at a bunch of the date comparison threads on these boards but unfortunately not been able to figure this thing out yet. still confused by some of the way conditionals handle variables...
here is what i where i am now... Code:
# a bunch of initializition steps are here ... STARTDATE=`date +%Y%m%d` while [ 1 ] # loop running all the time. do NOWDATE=`date +%Y%m%d` # if day changes then i want to reinitialize if [ $NOWDATE -gt $STARTDATE ] then # do all that initiallization again fi # ... a bunch of other code in here done thanks, dan |
![]() |
| Bookmarks |
| Tags |
| bash, comparison, conditional, date, shell |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|