Change echo output
I have the below command
echo "test1" > /tmp/file echo "test2" >> /tmp/file The output of /tmp/file is test1 test2 If I want the output is in same line as below , can advise what can i do ? thx test1 test2 |
|
Quote:
ya ..Chris is correct .. printf "test1" > /tmp/file printf "test2" >> /tmp/file |
Actually, I'm pointing at the escape codes for 'echo' ; specifically \c means don't print a newline.
|
You should use the "-n" option for echo, which tells it not to stick a newline on the end.
|
All times are GMT -5. The time now is 08:46 AM. |