Re: Hex for ^M

On May 1, 12:43 am, NeOnD <vikas...@xxxxxxxxx> wrote:

I have a script which seeks for ^M in files. e.g. it include a line
say -
find $(pwd) -type f -exec grep -l '^M' {} \;

Sometime while editing this script in Windows I mess with ^M & the
only way to restore is to go in Unix & edit the file in vi & come
So as a remedy (what I could think of) is there some HEX alternative I
could use for ^M ? Or anything else which represents ^M.


If you are using bash, you can enter character verbatim by pressing
Control-V followed by that character. In your case:
.... -exec grep -l '^M' {} \;

where, the '^M' above is not '^' and 'M', rather it's a control-v