Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!hubcap!mephisto!udel!haven!decuac!bacchus.pa.dec.com!decwrl!brister From: brister@decwrl.dec.com (James Brister) Newsgroups: comp.unix.shell Subject: Re: ok, i've got a question... Message-ID: Date: 25 Sep 90 19:50:58 GMT References: <42900@sequent.UUCP> <9651@jpl-devvax.JPL.NASA.GOV> Sender: news@wrl.dec.com (News) Organization: DEC Western Software Lab Lines: 23 In-Reply-To: lwall@jpl-devvax.JPL.NASA.GOV's message of 25 Sep 90 18:59:26 GMT X-Checksum-Snefru: b86f2c08 5a5bb96b 17872830 20ebd750 On 25 Sep 90 18:59:26 GMT, lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) said: > In article <42900@sequent.UUCP> calvin@sequent.UUCP (Calvin Goodrich) writes: > : ...for the unix.gods out there. i have a file that has a whole mess of > : null characters in it ('bout 1/2 a meg). is there any way (preferably > : a shell script) to strip them off? > Other possibilities: > sed '' bar I try to avoid this unless I know there'll be a new line fairly frequently (which in a file full of nulls is *usually* unlikely). sed (at least my version or it) has a line length limit that can cause problems here. > perl -pe 's/\0//g' bar Of course :-) James -- James Brister brister@decwrl.dec.com DEC Western Software Lab., Palo Alto, CA {uunet,sun,pyramid}!decwrl!brister