LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 12-01-2009, 02:52 AM   #1
mohit_parihar
LQ Newbie
 
Registered: Nov 2009
Posts: 28

Rep: Reputation: 15
What does backslash n 033 means in echo -e "\033[1m linux"?


can any body tell me the complete meaning of the above command.
 
Old 12-01-2009, 02:59 AM   #2
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Debian, SL
Posts: 5,202

Rep: Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120
Looks like it could be new line and setting the text colour to yellow.

Hang on there is no "backslash n": so no new line.

Evo2.

Last edited by evo2; 12-01-2009 at 03:06 AM. Reason: backslash n?
 
Old 12-01-2009, 06:46 AM   #3
Whyte
LQ Newbie
 
Registered: Mar 2007
Distribution: Ubuntu
Posts: 17

Rep: Reputation: 4
That is the so-called "Escape character", it can also be written (at least in Bash) as \e. It is used to signify the start of a lot of terminal codes, such as setting foreground/background colors, moving the cursor to another position, clearing the screen, and so on.

See man console_codes (or click here) for a list of these codes.
 
Old 07-25-2010, 08:21 PM   #4
rdgreenlaw
Member
 
Registered: May 2007
Distribution: Ubuntu 14.04 LTS
Posts: 59

Rep: Reputation: 16
This one was easy -- It makes everything after the m bright white (Bold)

To see it in action try this in a terminal window (cli):

echo -e "Normal Text\033[1mBold Text"

You will be able to see the escape character in action.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accepting single backslash "\" as a user input. sundar_r05 Linux - Enterprise 6 02-02-2010 05:29 AM
Book to refer for RHCE 033 infovijay Linux - Certification 1 07-21-2009 11:19 PM
Remove file \033[2~evtlog.2009-01-07 indiancosmonaut Programming 3 02-10-2009 12:32 PM
BASH: How to NOT echo to screen with "if echo $x | grep ".*"; then" eur0dad Programming 9 07-27-2006 02:14 PM
[python] print "\033[5;",x,"H=>" datbenik Programming 1 01-05-2006 05:12 AM


All times are GMT -5. The time now is 01:02 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