![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SED + Regex + SQL Input file | primal | Shell Programming and Scripting | 10 | 04-14-2008 02:24 PM |
| read input file for batch job | kinmak | Shell Programming and Scripting | 14 | 07-11-2007 08:22 AM |
| ls while read loop - internal read picking up wrong input | dkieran | Shell Programming and Scripting | 2 | 05-14-2007 04:02 PM |
| read/writte/input data in file. | dorek | Shell Programming and Scripting | 0 | 06-22-2006 08:31 AM |
| input inside while read loop | jhansrod | Shell Programming and Scripting | 3 | 08-13-2005 11:46 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Apply Regex to input read
Hi I am very new to Unix Shell. I have a question: How do you check the input value against a reqex? For example using korn Shell: Code:
echo "Please enter revision month: \c"
read revmon
if $revmon | egrep -c = '[A-Z]{3}[0-9]{2}"'
then
echo "OK"
else
echo "PLease re-enter a valid revision month (e.g. SEP07)"
fi
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|