LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 09-19-2009, 03:40 PM   #1
Akabaka
LQ Newbie
 
Registered: Oct 2005
Location: United States
Distribution: Ubuntu
Posts: 17

Rep: Reputation: 0
How can I use hexdump to display ASCII control codes?


I'm trying to read the output from /dev/tty7 and pipe it into hexdump... I'm wanting all regular alphanumeric/symbol characters to remain the same except for control codes (NL, ESC, NUL), which I want to be displayed as codes. I saw a format option for hexdump, %_u, but I can't figure out how to use it.

The reason I'm doing this is I'm creating a dumb serial terminal out of an IBM keyboard, a small text-only lcd screen, and an AVR microcontroller. Trying to learn what escape codes a shell is going to be sending and what to do with them.
 
Old 09-19-2009, 05:57 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,352

Rep: Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042
Try
Code:
hexdump -e ' "%_u" '
 
Old 09-19-2009, 06:52 PM   #3
Akabaka
LQ Newbie
 
Registered: Oct 2005
Location: United States
Distribution: Ubuntu
Posts: 17

Original Poster
Rep: Reputation: 0
Whoa... it works! Thanks! I can't use it to monitor the entire virtual terminal, but I can pipe commands into it, which is the next best thing.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Relationship between ASCII control codes and Process Signals jhwilliams Linux - Software 2 06-12-2009 03:51 PM
ascII and uf-8 codes incompatibility linuxamateur-two-too Linux - Networking 0 12-21-2005 08:05 PM
extended ascii codes in c++ crAckZ Programming 1 09-12-2005 04:04 PM
RH9 - ASCII codes using alt-gr ? manub Red Hat 0 03-14-2004 04:24 AM
ASCII Codes in linux slackmagic Linux - Newbie 2 12-22-2003 09:25 AM


All times are GMT -5. The time now is 05:01 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration