The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
help on egrep arund_01 Shell Programming and Scripting 2 05-13-2008 10:26 AM
egrep help Darklight Shell Programming and Scripting 1 04-17-2008 11:34 PM
egrep DNAx86 Shell Programming and Scripting 7 01-18-2008 04:59 AM
Egrep cheat sheet anywhere? Looking for meaning of egrep -c leelm UNIX for Dummies Questions & Answers 2 01-11-2008 11:37 AM
Egrep Help FuzzyNips UNIX for Dummies Questions & Answers 2 11-10-2004 12:25 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-08-2005
Registered User
 

Join Date: Dec 2005
Posts: 12
Stumble this Post!
egrep help

How can i make something like
if (echo "$arg2" | egrep -s '^[0-9]+\.[0-9]+km/h+$|^[0-9]+km/h+$'); then
not to output the value of $arg2 on the screen, evertime i get match it outputs the value of the variable on the screen which i don't need to do. I know for grep its -q option but it doesn't work for egrep.

using bash shell btw.

Anyone know?

Last edited by Vozx; 12-09-2005 at 12:05 AM.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 12-09-2005
mona's Avatar
Registered User
 

Join Date: Nov 2005
Location: Singapore
Posts: 96
Stumble this Post!
Redirect to the trash file. This will prevent from displaying in the screen

Code:
if(echo "$arg2" | egrep -s '^[0-9]+\.[0-9]+km/h+$|^[0-9]+km/h+$' > /dev/null);
Reply With Quote
  #3 (permalink)  
Old 12-09-2005
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 3,804
Stumble this Post!
egrep -q stops display of results.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 05:05 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0