LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 11-11-2010, 02:57 PM   #1
apeselis
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, 04:16 PM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Wheezy (Fluxbox WM)
Posts: 1,363
Blog Entries: 52

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Quote:
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:
Code:
echo -e "\033%150;200;5L" | od -b
which will give you an octal dump of the byte sequence:
Code:
0000000 033 045 061 065 060 073 062 060 060 073 065 114 012
 
  


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


All times are GMT -5. The time now is 08:31 AM.

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