Check if time legal in tcsh....
by DoME69 from LinuxQuestions.org on (#4S0DW)
Hi,
I want to verify that time is legal.
For example 23:00 = legal
25:00 = not legal.
When running the below code, of course I don't want to get the error message when time is not legal.
I tried to use the below but need you help since it's failed.
Quote:


I want to verify that time is legal.
For example 23:00 = legal
25:00 = not legal.
When running the below code, of course I don't want to get the error message when time is not legal.
I tried to use the below but need you help since it's failed.
Quote:
| if (`/bin/date -d "$arg" >& /dev/null` == "") then echo "\nError: Time $argv[1] not legal time" exit endif |