[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: grep "\" ... how



> On Fri Jun 11, 1999, Kenneth Scharf wrote:
> > I need to write a script to replace '\'s with '/', but how can I get
> > grep to accept '\' as a regular expression (it assumes it to be line
> > continue character, at least from the sh prompt)?
> 
> Put the expression in single quotes?

This doesn't work.  `\` is the quote character for grep.  You need to
quote the `\` itself; that is, to use '\\'


Reply to: