Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!sdd.hp.com!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!ux1.cso.uiuc.edu!midway!delphi.uchicago.edu!monty From: monty@delphi.uchicago.edu (Monty Mullig) Newsgroups: comp.unix.wizards Subject: replacing nulls in a file with sed. Message-ID: <1990Jul24.224811.22143@midway.uchicago.edu> Date: 24 Jul 90 22:48:11 GMT Sender: news@midway.uchicago.edu (News Administrator) Reply-To: monty@delphi.uchicago.edu (Monty Mullig) Organization: Univ. of Chicago, BSD Info. Systems Lines: 23 sorry to ask what i'm sure is a simple question, but i can't find this information in the documentation and experimentation has led nowhere. i have a file that comes with null characters randomly placed in it. i'd like to replace those nulls with spaces, but i can't seem to get sed to do this. the command: sed 's/\(^@\)/ /g' < infile > outfile removes the nulls, but doesn't replace them with spaces. in emacs, the null characters show up as ^@ characters and global search and replace works (using the control-q to enter ^@ as a true control character, rather than a carat and an at sign). thanks in advance, --monty mullig university of chicago biological sciences division monty@delphi.bsd.uchicago.edu 312 702-9130