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

Re: grep "\" ... how



> 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)?

You need to escape the '\' with another  one:
	grep '\\' file


Reply to: