PDA

View Full Version : Howto redirect two/more word on same line



aliahsan81
April 6th, 2009, 06:55 PM
HI

Is that possible that output of two command can redirected to one line like.




echo "its me" >> test.txt
echo " my name " >> test.txt


i want link this

text.txt content

its me my name

Possible let me know

dwhitney67
April 6th, 2009, 06:57 PM
echo -n "it's me"
echo " my name"

Note the -n option. It indicates that a newline should NOT be outputted.

aliahsan81
April 6th, 2009, 07:02 PM
actually i was using cat also.possible with

ghostdog74
April 7th, 2009, 01:42 AM
use printf instead of echo.