Register a domain and help support LQ
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 11-11-2010, 03:57 PM   #1
LQ Newbie
Registered: Nov 2010
Posts: 1

Rep: Reputation: 0
escape characters in Linux

My goal is to send escape characters from Linux to make scanner's LED blink. I've started with a simple "beep" command:
echo -e "\07"

and it worked. We are using WaveLink emulator and the escape sequences for the LED are
echo -e "\033%150;200;5L"

Linux returns me this: 150;200;5L
So, it doesn't work. What am I doing wrong for the LED sequences?
Old 11-11-2010, 05:16 PM   #2
Senior Member
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Jessie (Fluxbox WM)
Posts: 1,380
Blog Entries: 52

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
Originally Posted by apeselis View Post
echo -e "\033%150;200;5L"
Linux returns me this: 150;200;5L
So, it doesn't work. What am I doing wrong for the LED sequences?
You aren't doing anything wrong, it is just that the \033 has a special meaning when echoed to a terminal. If you want to really view what the echo generates, perhaps you can use od to dump it, for example:
echo -e "\033%150;200;5L" | od -b
which will give you an octal dump of the byte sequence:
0000000 033 045 061 065 060 073 062 060 060 073 065 114 012


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
List of '\e' escape characters, please Kenny_Strawn Programming 3 07-21-2010 02:02 PM
[SOLVED] Having trouble with escape characters in C madsovenielsen Programming 5 03-03-2010 07:36 AM
Paths and escape characters code-breaker Linux - Newbie 4 07-12-2006 12:24 AM
Variables and escape characters? flobadon Programming 4 09-10-2005 05:34 PM
Escape Characters in linux shunraj Linux - Software 1 05-18-2004 04:21 PM

All times are GMT -5. The time now is 09:17 AM.

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