Article 4S0DW Check if time legal in tcsh....

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:
if (`/bin/date -d "$arg" >& /dev/null` == "") then
echo "\nError: Time $argv[1] not legal time"
exit
endif
latest?d=yIl2AUoC8zA latest?i=hXeo2OqhVq0:3MR9OjVb0Z8:F7zBnMy latest?i=hXeo2OqhVq0:3MR9OjVb0Z8:V_sGLiP latest?d=qj6IDK7rITs latest?i=hXeo2OqhVq0:3MR9OjVb0Z8:gIN9vFwhXeo2OqhVq0
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments