LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Can't get echo to produce two lines of text (https://www.linuxquestions.org/questions/linux-software-2/cant-get-echo-to-produce-two-lines-of-text-196026/)

sknarf 06-21-2004 11:25 AM

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

michaelk 06-21-2004 11:48 AM

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

or

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


All times are GMT -5. The time now is 11:56 AM.