echo two command output in the same line

Red hat Red hat linux 7.1
January 24, 2011 at 19:07:17
Specs: Linux, 2G RAM
Hi,
I try to write script and echo two command at the same line .
echo "A"
echo "B"

How can I pipe above two command at the same line in text file .
So, in the output text file , you can see below ???
[code]
A B
[/code]
not
[code]
A
B
[/code]
Any sugggestion ???


See More: echo two command output in the same line

Report •

#1
January 24, 2011 at 22:09:11
(echo "A";echo "B")|xargs > mynewfile

Report •

#2
January 24, 2011 at 22:13:02
Acutally, I try to output below ps command two time and print on the same line .

ps -o %cpu,%mem,lstart,args,comm,cputime,pid,rss,vsz -p 1

how can I do that ???


Report •
Related Solutions


Ask Question