Path: utzoo!attcan!uunet!lll-winken!lll-tis!mordor!joyce!ames!amdahl!pyramid!prls!mips!dce From: dce@mips.COM (David Elliott) Newsgroups: comp.unix.wizards Subject: Re: Generating Octal/Hex Codes from Bourne Shell Keywords: Bourne Shell Fortune Message-ID: <2848@quacky.mips.COM> Date: 18 Aug 88 21:03:04 GMT References: <118@gillxp> <1054@marconi.SW.MCC.COM> Reply-To: dce@quacky.UUCP (David Elliott) Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 19 In article <1054@marconi.SW.MCC.COM> knutson@marconi.sw.mcc.com.UUCP (Jim Knutson) writes: >In article <118@gillxp> rg@gillxp (Richard J. Gill) writes: >>... Any ideas on how I >>can generate the fully ASCII set from the Bourne shell on the >>Fortune? >Well, one way to do it would be to use the tr command. For instance, >to repeat your examples: > echo . | tr . '\007' # 0x07 This is a very useful trick. 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. Well, I guess C is good for at least *one* thing ;-) -- David Elliott dce@mips.com or {ames,prls,pyramid,decwrl}!mips!dce