diffing special chars

Robert Ambrose rna@testpt.com
Thu, 24 Aug 2000 19:05:42 -0700 (MST)


FWIW, I'd put the sed expression into single quotes:

$ echo "fred\ wuz\ hier." | sed 's/\\ / /g'
fred wuz hier.

I've found that when you're dealing with spaces in filenames, sh just
can't handle it.  perl is my favorate way to deal with this.

rna

On Thu, 24 Aug 2000, der.hans wrote:

> diff -a doesn't do what I need. Normally I avoid sed/awk :), but that's
> not bad. However, it isn't working like I'd expect.
> 
> sh-2.01$ echo "fred\ wuz\ hier." | sed s/\\\ /\ /
> fred\ wuz\ hier.
> 
> Two backslashes give me an error about an unterminated s. 
> 
> I would still prefer ways to get "find" and "tar" to use the same method
> for printing unprintable characters and spaces at the same time.
> 
> Thanks for the pointer,
> 
> der.hans
> -- 
> #  der.hans@LuftHans.com   home.pages.de/~lufthans/   www.Opnix.com
> #  Help Jerry Lewis stamp out M$...oops that's MDA - der.hans
> 
> 
> ________________________________________________
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't post to the list quickly and you use Netscape to write mail.
> 
> Plug-discuss mailing list  -  Plug-discuss@lists.PLUG.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>