![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| passing an input parameter like date thru jcl using BPXBATCH utility | Sujatha Gowda | SUN Solaris | 0 | 06-03-2008 05:23 AM |
| awk/input parameter | wannalearn | Shell Programming and Scripting | 3 | 07-30-2007 10:42 AM |
| how do I make dynamic parameter names? Or get the value of a parameter evaluated twi | Awanka | Shell Programming and Scripting | 2 | 04-19-2007 06:37 PM |
| Shell script with input parameter | jhmr7 | UNIX for Dummies Questions & Answers | 1 | 07-12-2005 09:04 PM |
| Need to validate a date input format | rajugp1 | Shell Programming and Scripting | 1 | 12-05-2002 07:12 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Input parameter format
Hi,
My script expects 2 inputs and one of them is supposed to be time, I would like to check if the given input is in validate format (i.e. 16:00), could anyone help me out here? thanks! |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
This is the prelim and u will have to look for tighter time checking ..but thats the start....
#! /bin/ksh input=$1 echo $input if [[ $input = [0-2][0-9]:[0-6][0-9] ]] then echo "Correct input" else echo "Incorrect input" fi |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|