Re: Hex for ^M



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

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
back.
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.

10x
NeO

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
control-m
.



Relevant Pages

  • Re: compiler info in kernel identification string
    ... prone to turn what should be a rather simple script into a ... ... I don't think newvers.sh is a mess and I find current features ... string, then source custom script if it exists. ...
    (freebsd-current)
  • Re: How to boost performance of my crude script?
    ... I haven't yet looked at your script yet, but at first sight, it looks ... die "outfile already exists on system"; ... The fact that you don't declare variables in the smallest possible scope ... Indentation is a mess. ...
    (comp.lang.perl.misc)
  • Re: internet explorer
    ... i learned a long time ago to not mess with the ... registry, but after several attempts at other fixes tried ... a "malicious" script, ... when i try to access the internet options ...
    (microsoft.public.windowsxp.security_admin)
  • Mangal Pandey
    ... What a mess! ... but the script was a horror. ... Aamir was looking flabby and jowly and his love scenes with Rani ...
    (rec.arts.movies.local.indian)
  • Re: For Comments: File Deduplicatin in bash
    ... The script is fairly sparse, ... The whole mess was a couple of hundred gigabytes ... trust the original tree as the full tree, ... script was smart enough to extract only those infos which ...
    (comp.os.linux.misc)