Ugly file name

John E Van Deusen III jiii at visdc.UUCP
Tue May 16 10:58:34 AEST 1989


In article <17509 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
> In article <535 at 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



More information about the Comp.unix.wizards mailing list