Xref: utzoo comp.unix.xenix:5995 comp.unix.questions:13616 comp.unix.wizards:16151 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!visdc!jiii From: jiii@visdc.UUCP (John E Van Deusen III) Newsgroups: comp.unix.xenix,comp.unix.questions,comp.unix.wizards Subject: Re: Ugly file name Keywords: rm cat mv regexp Message-ID: <536@visdc.UUCP> Date: 16 May 89 00:58:34 GMT References: <128@tdl.UUCP> <7170@bsu-cs.bsu.edu> <12970@ut-emx.UUCP> <535@visdc.UUCP> <17509@mimsy.UUCP> Reply-To: jiii@visdc.UUCP (John E Van Deusen III) Distribution: usa Organization: VI Software Development, Boise, Idaho Lines: 37 In article <17509@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: > In article <535@visdc.UUCP> I wrote: >> ... the following construct can be used to replace any argument: >> >> "`echo '\xxx\xxx\xxx\c'`" >> >> where xxx is any octal number. I would like to correct this to read "the System V construct ... "`echo '\0xxx\c'`" where xxx is zero to three octal digits." > > Only if you are dealing with a broken SysV echo (echo should *not* do > escape interpretation, ...) ... and even then you may have trouble > generating meta characters (values in 0200..0377) if you have an older > shell. If you have a working echo, use printf(1): > > "`printf %s '\xxx\xxx\xxx'`" > Is there a particular SysV echo that is broken, or are you saying that System V echo is broken, in general, because, in your opinion, it should *not* do escape interpretation? I do not consider a command "broken" if it does what the manual says it will do and does not do anything else. The ability to put any pattern of bits into an argument more than compensates, in my opinion, for the inconvenience of entering two back slashes when escape interpretation is not intended. If you prefer to use the separate command printf(1), not included with system V, fine. The system V echo(1) command will generate octal values in the range 0-0377 and write them to the standard output file. -- John E Van Deusen III, PO Box 9283, Boise, ID 83707, (208) 343-1865 uunet!visdc!jiii