Generating Octal/Hex Codes from Bourne Shell
Chris Torek
chris at mimsy.UUCP
Fri Aug 19 17:58:34 AEST 1988
>In article <1054 at marconi.SW.MCC.COM> knutson at marconi.sw.mcc.com.UUCP
>(Jim Knutson) writes:
>> echo . | tr . '\007' # 0x07
In article <2848 at quacky.mips.COM> dce at mips.COM (David Elliott) writes:
>This is a very useful trick.
Aye.
>One thing it doesn't handle is generating a NUL. I've tried all
>kinds of things, but have never found a way to generate a NUL
>character from a shell script.
Use the `printf' command:
$ printf %c \\0
Surely you have a printf command?!?
[The source and manual entry has just been submitted to comp.sources.unix,
in the year, hmm...
$ printf %r\\n 1988
mcmlxxxviii]
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain: chris at mimsy.umd.edu Path: uunet!mimsy!chris
More information about the Comp.unix.wizards
mailing list