You can use the octal dump, od, utility to display non-printable characters. Amongst other things, we have used it to detect the header bytes in a stream of binary packets.
Here's are some examples.
Displays in character format
# od -c a.out
Capture a serial stream and display in character format
# tip -9600 /dev/term/a | od -c
Capture a serial stream and display in hexadecimal format
# tip -9600 /dev/term/a | od -x
Related post
This blog covers Unix system administration HOWTO tips for using inline for loops, find command, Unix scripting, configuration, SQL, various Unix-based tools, and command line interface syntax. The Unix OS supports tasks such as running hardware, device drivers, peripherals and third party applications. Share tips/comments. Read the comments. But most importantly: Read Disclaimer - Read Disclaimer.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment