Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mit-eddie!uw-beaver!zephyr.ens.tek.com!tektronix!sequent!lugnut From: lugnut@sequent.UUCP (Don Bolton) Newsgroups: comp.unix.shell Subject: Re: ok, i've got a question... Message-ID: <42947@sequent.UUCP> Date: 25 Sep 90 22:30:45 GMT References: <42900@sequent.UUCP> <9651@jpl-devvax.JPL.NASA.GOV> Reply-To: lugnut@sequent.UUCP (Don Bolton) Organization: Sequent Computer Systems, Inc Lines: 29 In article <9651@jpl-devvax.JPL.NASA.GOV> lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) writes: >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? > >If your tr works like mine, you can just say > > tr '' '' bar > >Other possibilities: > > sed '' bar > perl -pe 's/\0//g' bar AWK AWK ACKKKK :-) awk -f filebelow newlist { for (i = 1; i <= NF; i = i + 1) { if (i >= NF) printf("%s",$i) else printf("%s ", $i) } printf("\n") } course I assume the "null" characters are just blanks here