|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | 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 !! |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
grep question
Instead of using the following command
#dmesg | grep -v sendmail | grep -v xntpd How can I use just one grep -v and give both arguments. Please suggest thanks |
| Sponsored Links | ||
|
|
|
#2
|
|||
|
|||
|
Code:
#dmesg | grep -v -e sendmail -e xntpd |
|
#3
|
||||
|
||||
|
that i am sorry did not work on solaris 8
# dmesg | grep -v -e sendmail -e xntpd grep: illegal option -- e Usage: grep -hblcnsviw pattern file . . . Broken Pipe |
|
#4
|
||||
|
||||
|
use awk Code:
# dmesg | awk '!/sendmail/&&!/xntpd/{print}' |
|
#5
|
||||
|
||||
|
it works great thanks
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| grep question | tim-bobby | UNIX for Dummies Questions & Answers | 4 | 10-05-2007 11:58 AM |
| Question on Grep! | bourne | Shell Programming and Scripting | 5 | 01-08-2007 08:35 AM |
| Another grep question | kingdbag | UNIX for Dummies Questions & Answers | 6 | 10-27-2006 01:56 AM |
| Grep Question | nazri76 | UNIX for Dummies Questions & Answers | 3 | 08-18-2006 09:40 AM |
| grep question | Jaken | Shell Programming and Scripting | 6 | 05-28-2006 08:24 PM |