Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uflorida!haven!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.unix.wizards Subject: Re: Generating Octal/Hex Codes from Bourne Shell Keywords: Bourne Shell Fortune Message-ID: <13081@mimsy.UUCP> Date: 19 Aug 88 07:58:34 GMT References: <118@gillxp> <1054@marconi.SW.MCC.COM> <2848@quacky.mips.COM> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 27 >In article <1054@marconi.SW.MCC.COM> knutson@marconi.sw.mcc.com.UUCP >(Jim Knutson) writes: >> echo . | tr . '\007' # 0x07 In article <2848@quacky.mips.COM> dce@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@mimsy.umd.edu Path: uunet!mimsy!chris