Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 12-01-2009, 02:52 AM   #1
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
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1289Reputation: 1289Reputation: 1289Reputation: 1289Reputation: 1289Reputation: 1289Reputation: 1289Reputation: 1289Reputation: 1289
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.


Last edited by evo2; 12-01-2009 at 03:06 AM. Reason: backslash n?
Old 12-01-2009, 06:46 AM   #3
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
Registered: May 2007
Location: Newport, Maine, USA
Distribution: Debian 8.7
Posts: 72

Rep: Reputation: 18
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.


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 > Forums > Linux Forums > Linux - General

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