![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Egrep cheat sheet anywhere? Looking for meaning of egrep -c | leelm | UNIX for Dummies Questions & Answers | 2 | 01-11-2008 03:37 PM |
| yet another awk field syntax question | prkfriryce | Shell Programming and Scripting | 4 | 03-22-2007 01:13 PM |
| question on egrep | rohitv | UNIX for Dummies Questions & Answers | 10 | 05-25-2006 05:29 PM |
| help with egrep syntax | Gerry405 | UNIX for Dummies Questions & Answers | 3 | 08-06-2005 02:01 PM |
| awk syntax question | hcclnoodles | Shell Programming and Scripting | 2 | 10-28-2004 12:45 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
egrep syntax question
I have a (seemingly) simple question for you guys
I need my script to allow users to enter numbers with either 2 decimal points or with no decimal points. here's the code I have right now for testing, but I can't for the life of me figure out whats wrong! (it's been broken up into 2 different grep statements) decimal=10.500 echo $decimal | egrep -q '[0-9+]' && echo success || echo failure echo $decimal | egrep -q '[0-9+]\.[0-9][0-9]' && echo success || echo failure any insight would be greatly appreciated as this has been the cause of much frustration for me! |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|