1833780 Members
2354 Online
110063 Solutions
New Discussion

echo script with /c

 
SOLVED
Go to solution
Ratzie
Super Advisor

echo script with /c

I am trying to write a script that echos a line, then runs a command, then echos done on the same line.

How is that done?
echo "This is line 1..." \c
command
echo "Done"

I want the output to be...

This is line 1... Done

Thanks for the help!
2 REPLIES 2
Sundar_7
Honored Contributor
Solution

Re: echo script with /c


It also depends if the "command" will send newline to the stdout/stderr or not.

If u r not really concerned about the output of the command then best thing to do

echo "This is line1 ...\c"
command 1>/dev/null 2>/dev/null
echo "Done"
Learn What to do ,How to do and more importantly When to do ?
RAC_1
Honored Contributor

Re: echo script with /c

I could not get what you want.

echo "your_stuff";command|tr "\n" "\t";echo "Done"

Anil
There is no substitute to HARDWORK