ascii nulls, awk, and tr
From: Gerard C Blais (gerard.blais_at_mci.com)
Date: 08/03/04
- Next message: colin_lyse: "Re: is there a way to limit how big a file can get using unix quota?"
- Previous message: JEDIDIAH: "Re: IBM: Linux is ready for the Mainframe. SUN: No it's not!"
- Next in thread: Richard L. Hamilton: "Re: ascii nulls, awk, and tr"
- Reply: Richard L. Hamilton: "Re: ascii nulls, awk, and tr"
- Reply: all mail refused: "Re: ascii nulls, awk, and tr"
- Reply: Stephane CHAZELAS: "Re: ascii nulls, awk, and tr"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 03 Aug 2004 15:33:30 -0400
I have text files that may contain ascii nulls.
I'd like to delete the null characters.
I also have a lot of other things to do to the rows, and I'm doing
them in awk already, so adding something to an awk script would be a
nice way to go.
None of the awks on my Solaris (/usr/bin/awk, /usr/xpg4/bin/awk,
/usr/bin/nawk) recognize ascii nulls. Someone suggested mawk, and I'm
trying to get that installed. If anyone knows if mawk will or won't
work, I'd be interested.
Meanwhile, it seemed like a perfect fit for tr.
BUT, if I try tr -d \000 null.txt > null.nonull,
tr just hangs, and there is no output. null.txt is a 3 line file
with nulls in the middle of line 2.
Any ideas?
Thanks,
Gerry
- Next message: colin_lyse: "Re: is there a way to limit how big a file can get using unix quota?"
- Previous message: JEDIDIAH: "Re: IBM: Linux is ready for the Mainframe. SUN: No it's not!"
- Next in thread: Richard L. Hamilton: "Re: ascii nulls, awk, and tr"
- Reply: Richard L. Hamilton: "Re: ascii nulls, awk, and tr"
- Reply: all mail refused: "Re: ascii nulls, awk, and tr"
- Reply: Stephane CHAZELAS: "Re: ascii nulls, awk, and tr"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]