LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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, 03: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, 03:59 AM   #2
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,590

Rep: Reputation: 1228Reputation: 1228Reputation: 1228Reputation: 1228Reputation: 1228Reputation: 1228Reputation: 1228Reputation: 1228Reputation: 1228
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 04:06 AM. Reason: backslash n?
 
Old 12-01-2009, 07: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, 09: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 06:29 AM
Book to refer for RHCE 033 infovijay Linux - Certification 1 07-22-2009 12:19 AM
Remove file \033[2~evtlog.2009-01-07 indiancosmonaut Programming 3 02-10-2009 01:32 PM
BASH: How to NOT echo to screen with "if echo $x | grep ".*"; then" eur0dad Programming 9 07-27-2006 03:14 PM
[python] print "\033[5;",x,"H=>" datbenik Programming 1 01-05-2006 06:12 AM


All times are GMT -5. The time now is 04:18 AM.

Main Menu
Advertisement
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