grep -v (what means -v)

grep -v (what means -v)

Post by Chris_Greg » Sat, 10 May 1997 04:00:00




> Does anybody no why the option -v has that letter?

inVert

i and n were already taken.

-- =

| Christopher Gregg        (512) 891-7922 | Sorry, my return address |
| Motorola Wireless Development Tools     | is intentionally invalid |
| 6501 William Cannon Drive West MD-OE314 | Remove the "spamfilter." |
| Austin, TX 78735-8598                   | Where did netiquette go? |

 
 
 

grep -v (what means -v)

Post by Magnus Lab » Sat, 10 May 1997 04:00:00


Does anybody no why the option -v has that letter?
AFAIK -v is used normally for verbose mode.
(I do not want to know what the option -v does)
Magnus

 
 
 

grep -v (what means -v)

Post by Tad McClell » Sat, 10 May 1997 04:00:00


: Does anybody no why the option -v has that letter?

Probably because -i was already used for <i>gnore case

So they choose to use -v for in<v>ert...

: AFAIK -v is used normally for verbose mode.
: (I do not want to know what the option -v does)

--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming

 
 
 

grep -v (what means -v)

Post by Mike Ekhol » Sat, 10 May 1997 04:00:00


On 9 May 1997 14:57:33 GMT, Magnus said these wise words:

: Does anybody no why the option -v has that letter?
: AFAIK -v is used normally for verbose mode.
: (I do not want to know what the option -v does)
: Magnus

the -v stands for inVert
-i is already used for ignore, I think.

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      "All I ask for is a T1 to my house, is that too much to ask for?"

 
 
 

grep -v (what means -v)

Post by Villy Kru » Sun, 11 May 1997 04:00:00



>: Does anybody no why the option -v has that letter?
>: AFAIK -v is used normally for verbose mode.
>: (I do not want to know what the option -v does)

It might have been inspired by the v command in ed like
g/RE/p is regular grep
v/RE/p is the inverse grep.

Now, why was the letter v chosen for that function in ed??????

This is only guessing

Villy

 
 
 

1. grep sTerm * | grep -v grep ???

in .bashrc

alias r='ps ax | grep $1 | grep -v grep'

this works from the command line but doesn't work from the bashrc.
Apparently there's a syntax problem.

...and

. filename

where can I read about this commad that is found in bash and sh
scripts?  I searched the bash and one or two other man pgs to no
avail.  Thanks gurus.

--


2. Help! Printing to line printer from C program

3. tail | grep | grep | grep

4. Kernel version support for CD-RW

5. How to make grep select both lines using only a single 'grep' command

6. Solaris 7 AccelstarII driver

7. grep question New to grep

8. XFree86 Text Color Help!

9. grep octal value (grep '\0145' /tmp/test) doesn't work !!

10. Bug in grep or man grep

11. lscfg | grep en and then grep lo

12. PLEASE HELP A NEWBIE: grep doesn't grep

13. grep attempts to grep in non-ascii files