LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-21-2004, 12:25 PM   #1
sknarf
LQ Newbie
 
Registered: Jun 2004
Posts: 6

Rep: Reputation: 0
Can't get echo to produce two lines of text


i am trying to write a script that will control my lcd brightness of my screen and i am using the echo command to write the new settings to file. One problem though is i can't seem to get two or more lines from the echo command, even when i use the -e option, please help.

Some examples:
echo -e first line \n second line -> frist line n second line
echo -e first line \r second line -> frist line r second line

Thank you
Frank
 
Old 06-21-2004, 12:48 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 24,985

Rep: Reputation: 5678Reputation: 5678Reputation: 5678Reputation: 5678Reputation: 5678Reputation: 5678Reputation: 5678Reputation: 5678Reputation: 5678Reputation: 5678Reputation: 5678
Like this:
echo -e First line'\n'second > file.txt

or

echo first line > file.txt
echo second line >> file.txt
 
  


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
echo multiple lines of text twistedpair Linux - Software 9 08-08-2007 07:07 PM
Grab text lines in text file LULUSNATCH Programming 1 12-02-2005 11:55 AM
echo typing text? LocoMojo Linux - Newbie 9 08-30-2005 10:41 PM
Delay in echo when entering text into Firefox 0.8 Shade Linux - Software 4 04-02-2004 01:01 PM
how to produce a text file from man w/o formatting? spyghost Linux - Newbie 2 07-30-2003 07:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:59 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
Open Source Consulting | Domain Registration