![]() |
|
|
|
|
|||||||
| 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 |
| limiting failed logins to three | csaunders | HP-UX | 1 | 10-18-2007 06:56 AM |
| Aplication user and kernel mode (data access) | Brendan Kennedy | High Level Programming | 1 | 05-27-2007 02:45 PM |
| AIX v.5.1 - system and user data backup | Sezgin | AIX | 5 | 01-08-2007 03:29 AM |
| Limiting length of user in while creating user | Satya Mishra | AIX | 2 | 04-14-2005 11:40 PM |
| Limiting access | misha | UNIX for Dummies Questions & Answers | 4 | 02-24-2001 04:25 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#8
|
|||
|
|||
|
Thanks Very Much !!!
|
| Forum Sponsor | ||
|
|
|
#9
|
|||
|
|||
|
now that i have done it for months
how do i restrict user inputs for date based on the month chosen? is it: Code:
while true; do echo " " echo "Enter Date of the Month (1-31): " read DATE case $DATE in [1-31]);; *) echo " " echo "Invalid date, try again" >&2;; esac done grep $4 "$DATE" *.hits >tempfile |
|
#10
|
|||
|
|||
|
The wildcard is not valid, you are looking for 1-3 or 1.
Code:
case $DATE in [1-9]|[12][0-9]|3[01]) break;; *) echo Invalid date, try again >&2;; esac (I'd hate to use a script which prompts interactively, myself.) |
|
#11
|
|||
|
|||
|
ok i have entered this to limit it from dates 1-31
Code:
case $DATE in [1-9]|[12][0-9]|3[01]) break;; *) echo Invalid date, try again >&2;; esac |
|
#12
|
|||
|
|||
|
1-9, 10-29, and 30-31 should work, are you saying they don't?
|
|||
| Google The UNIX and Linux Forums |