Re: Using grep to find a string containing stars
From: Bit Twister (BitTwister_at_mouse-potato.com)
Date: 11/25/05
- Next message: Stephane Chazelas: "Re: Using grep to find a string containing stars"
- Previous message: Matthieu Gaillet: "Using grep to find a string containing stars"
- In reply to: Matthieu Gaillet: "Using grep to find a string containing stars"
- Next in thread: Bill Marcum: "Re: Using grep to find a string containing stars"
- Reply: Bill Marcum: "Re: Using grep to find a string containing stars"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 25 Nov 2005 08:15:09 -0600
On Fri, 25 Nov 2005 14:00:15 +0100, Matthieu Gaillet wrote:
>
> I encounter some difficulties finding the string "***" using the command
> grep under Sun's Unix Interactive (pure vintage)
>
> it seems that the star is acting as a wildcard...
>
> example : the command grep "***" file.txt reports ALL the lines of the file.
>
>
> Any comments/advice on this ?
Use the escape character to prevent expansion by the shell. On linux
grep "\*\*\*" file.txt
- Next message: Stephane Chazelas: "Re: Using grep to find a string containing stars"
- Previous message: Matthieu Gaillet: "Using grep to find a string containing stars"
- In reply to: Matthieu Gaillet: "Using grep to find a string containing stars"
- Next in thread: Bill Marcum: "Re: Using grep to find a string containing stars"
- Reply: Bill Marcum: "Re: Using grep to find a string containing stars"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|