On Thu, 2002-06-20 at 03:35, daniel wrote:
> "rm Icon?" or "rm Icon?" will work of course, but it'll blow away stuff i
> may want to keep.  ie files named "Icons" or something like that.  what i'm
> really looking for is a way to represent the "\r" so that i can match the
> filename exactly.
> 

I can't figure out a good way to test this but fwiw I belive that you
can specify the mac newline using hexidecimal equivients

I had to parse some html that was built on a mac tool that had what I
assume to be the same cars and finally found them to be replaceable in
perl using  perl -p -e 's/\x0D/\x0A/g;

back after a little looking.

This is convoluted as hell, and I am sure there is a better way to do
this but I think I have succesfully worked through this

I was able to let echo spit out the x0d which is the carriage return

see if this fits:

Of course once I started playing with it I found the old vi ctrl-V
ctrl-M trick works too

$ touch icon`echo -en "\r"`
$ ls ic*
icon?
$ ls icon 
ls: icon: No such file or directory
$ ls icon^M        #this was done with ctrl-V and ctrl-M  Should work!
icon?

#this is kind of cool, use xxd to see the hexdump

$ ls icon^M |xxd
0000000: 6963 6f6e 0d0a                           icon..

# the 0a is the newline put there by ls I belive

$ touch icon1
$ ls icon*
icon?  icon1
$ rm icon^M
$ ls icon*
icon1


HTH

Bret



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to