[PLUG] Identifying white space in text files
Rich Shepard
rshepard at appl-ecosys.com
Tue Dec 24 15:01:59 UTC 2024
On Tue, 24 Dec 2024, Russell Senior wrote:
> cat <yourfile> | tr -d '[:graph:]' | tr -d '\n\r' | hexdump -ve '1/1
> "%02X " "\n"' | sort | uniq -c
>
> This will give you a count of non-printing characters ([:graph:] is
> "all printable characters, not including space") excluding carriage
> return and line feed. Space is hex 20, Tab is hex 09.
>
> You could wrap that in a script.
Thanks,
Rich
More information about the PLUG
mailing list