On 2007-01-13 18:45, Gary Kline <[EMAIL PROTECTED]> wrote: > Anybody know if I can do a perl substitution of the scads of > \x80\x9D to simple double-quotes (") from the command line?
You already have part of the syntax right: ,---------------------------------------------------------------- | [EMAIL PROTECTED]:/home/keramida$ hd binary.dat | 00000000 80 68 65 6c 6c 6f 20 77 6f 72 6c 64 9d 0a |.hello world..| | 0000000e | [EMAIL PROTECTED]:/home/keramida$ perl -pe 's/\x80/"/; s/\x9d/"/;' < binary.dat | "hello world" | [EMAIL PROTECTED]:/home/keramida$ `---------------------------------------------------------------- Note how the file `binary.dat', which I edited with hexl-mode in Emacs, to insert the 0x80 and 0x9D hex values, gets converted to "hello world" on output. _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"