Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

find a non-printable ascii

Status
Not open for further replies.

darioit

IS-IT--Management
Sep 23, 2010
3
IT
Hello,

how can I find a non-printable ascii character in a txt file with awk utility?

Regards
Dario
 
Hi

Which AWK implementation ?
Code:
awk '/[^[:print:]]/{print"found"}' /input/file

[gray]# or[/gray]

awk '/[[:cntrl:]]/{print"found"}' /input/file
Tested with [tt]gawk[/tt], probably will not work with other implementations.

If you not have to do other text processing, maybe searching in a hex dump of the file will be easier.


Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top