![]() |
|
|
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 |
| | help | unix | grep (GNU grep) 2.5.1 | advanced regex syntax | MykC | UNIX for Dummies Questions & Answers | 4 | 10-15-2009 11:52 AM |
| | help | unix | grep - Can I use grep to return a string with exactly n matches? | MykC | UNIX for Dummies Questions & Answers | 7 | 10-13-2009 02:57 PM |
| MEM=`ps v $PPID| grep -i db2 | grep -v grep| awk '{ if ( $7 ~ " " ) { print 0 } else | hariza | Shell Programming and Scripting | 4 | 09-18-2008 03:56 AM |
| grep and fetching lines after grep | arghya_owen | Shell Programming and Scripting | 2 | 07-16-2008 08:25 AM |
| Make grep -c display like grep -n? | Jerrad | Shell Programming and Scripting | 2 | 08-25-2006 01:20 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
hello everyone, i'm taking a class on unix and linux, and have come across a problem that my teacher couldn't figure out either: the testing file i'm using: Code:
This is a test of grep to see how inversion really works and figure out the problem that the class is having hopefully this works so here's some things i've tried: Code:
cat test|grep 'figure' output: and figure out the problem that the class is having cat test|grep -A 1 'figure' output: and figure out the problem that the class is having hopefully this works and here's the problem: cat test|grep -v -A 1 'figure' output: This is a test of grep to see how inversion really works and figure out the problem that the class is having hopefully this works so, why does grep behave like that?, i thought that the output would be: Code:
This is a test of grep to see how inversion really works instead it acts like it broke, and outputs the entire file, any help is much appreciated |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|