How to do a grep on expression "\e"

104 views Asked by At

I'm on SOLARIS10. The grep of this operating system doesn't accept the "-e " option. I would like to do a grep on the line beginning by \e in my log file.

I did

grep  "\\e" file.log

Doesn't work I 've got all the line of the files, and

grep  "/\e" file.log

stops on the first line that the tool met.

Thanks for you help

1

There are 1 answers

1
Sadhun On BEST ANSWER

Try the below grep,

grep '^\\e' filename

Or

Try the below sed,

sed -n '/^\\e/p' filename