How to grep " (diuble quote) from a file?

How to grep " (diuble quote) from a file?

Post by aaa » Sun, 27 Oct 2002 06:49:33



Does anyone know how to grep " (double quote) from a file?

I have been try:

    grep "  file
    grep "\"" file

It does NOT work.

Thanks

 
 
 

How to grep " (diuble quote) from a file?

Post by Greg Andre » Sun, 27 Oct 2002 07:50:00



>Does anyone know how to grep " (double quote) from a file?

>I have been try:

>    grep "  file
>    grep "\"" file

>It does NOT work.

grep '"' file

worked for me.

  -Greg
--

     I have a map of the United States that's actual size.
                                -- Steven Wright

 
 
 

How to grep " (diuble quote) from a file?

Post by Greg Andre » Mon, 28 Oct 2002 01:11:44




>> Does anyone know how to grep " (double quote) from a file?

>> Greg Andrews:     grep '"' file

>grep \" file
>grep "\"" file

>also works.

The original poster said "\"" did not work, and it
didn't work for me, either.  I'm not sure why not, though.

  -Greg
--

     I have a map of the United States that's actual size.
                                -- Steven Wright

 
 
 

How to grep " (diuble quote) from a file?

Post by Joe Halpi » Mon, 28 Oct 2002 02:24:36





> >> Does anyone know how to grep " (double quote) from a file?

> >> Greg Andrews:     grep '"' file

> >grep \" file
> >grep "\"" file

> >also works.

> The original poster said "\"" did not work, and it
> didn't work for me, either.  I'm not sure why not, though.

Works for me. But try

grep '["]' file

Joe

 
 
 

How to grep " (diuble quote) from a file?

Post by Robert Heuse » Mon, 28 Oct 2002 10:35:41


Quote:>>The original poster said "\"" did not work, and it
>>didn't work for me, either.  I'm not sure why not, though.

> Works for me. But try

> grep '["]' file

> Joe

This sounds like a subtle difference between different implementations of grep.

Would you be so kind as to elaborate on

which OS are you using ?
which version of grep are you using ?

regards
Robert

 
 
 

How to grep " (diuble quote) from a file?

Post by Stephane CHAZELA » Tue, 29 Oct 2002 01:10:51



>>>The original poster said "\"" did not work, and it
>>>didn't work for me, either.  I'm not sure why not, though.
[...]
> This sounds like a subtle difference between different implementations of grep.

They may also be using csh.

--
Stphane

 
 
 

How to grep " (diuble quote) from a file?

Post by aaa » Tue, 29 Oct 2002 05:34:00


Thanks .  It works.





>> >> Does anyone know how to grep " (double quote) from a file?

>> >> Greg Andrews:     grep '"' file

>> >grep \" file
>> >grep "\"" file

>> >also works.

>> The original poster said "\"" did not work, and it
>> didn't work for me, either.  I'm not sure why not, though.

>Works for me. But try

>grep '["]' file

>Joe

 
 
 

1. unix "fortune" compatible b5 quotes file?

Anyone have a pointer to a b5 fortune file?

[ for linux fortune ]

--

---
Sami Yousif


http://www.mav.net/teddyr/syousif

[eMail sent to any of my addresses is subject to the Conditions outlined
in http://www.mav.net/teddyr/emailtos.shtml]

[Note: I no longer support ARNet (arn.net) as an ISP nor WTAMU
(wtamu.edu) as an educational institution nor LEK (lektech.com) as a
Computer
Supplier] {http://www.mav.net/teddyr/access/banned.shtml}

[heard somewhere: "You have the right to remain clueless. Anything you
know may be used against you in a court of law"]

Another day, so many more LARTS to go. [BOFH, BUFH, JOAT]

"Understanding is a three edge sword: Our side, Their Side, and the
Truth" Babylon 5

<time is on my side>

Tuesday, January 19th 2038, 03:14:07 UTC: Are YOU Ready?

2. Fallback hard coded IP address when DHCP server not found.?

3. Q: sh: Can I quote '"' in a double quoted string?

4. Who to contact when I want to modify the code a Linux driver ?

5. "Standard Journaled File System" vs "Large File Enabled Journaled File System"

6. FTP through IP Masq'd network - How?

7. How do I `grep "*" file` in /bin/csh ?

8. CD-ROM stopped working...

9. "grep"-ing in gzipped text-files

10. how to grep "[0]" file?

11. action on tail -f file | grep "word to make some action"

12. fgrep[grep] -i ".*R$" file

13. grep files in which the word "TEST" is present