![]() |
|
|
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 |
| Shell script - If---fi condition | yog_chavan | Shell Programming and Scripting | 4 | 05-07-2008 10:46 AM |
| Condition test | felixwhoals | UNIX for Dummies Questions & Answers | 2 | 12-22-2007 08:47 AM |
| Condition test ( [[ ]] ) doubt | thambi | Shell Programming and Scripting | 2 | 08-17-2007 03:52 AM |
| test and if condition | ciroredz | Shell Programming and Scripting | 9 | 06-27-2007 10:17 AM |
| Bad day !! test condition failed --need a one liner to do --help | jambesh | Shell Programming and Scripting | 13 | 09-06-2006 09:55 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
need help with test condition in shell script
I'm new to scripting and I need help with a bourn shell script. What i'm trying to do is a test condition where "if the time is within 2 hours, it's true" and so on.
The time is in the following format DATE=`/bin/date +"%Y%m%d%H%S"` for example, 20060907152000. So, what the script first does is go to a web page and the web page returns a number in that exact format. I have the script set up to go to the web page and look at that line. What I need is help with a test condition to have it check to see if the variable from the web is within 2 hours of the system time and I have no idea how to do that. Can someone help me? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|