Reputation: 488
How can I remove the new line before the prompt. I don't exactly know how to formulate the question, so here's an example.
I want to pass from
%> echo "hello world"
hello world
%>
to
%> echo "hello world"
hello world%>
I tried sed 's/\\n//'
to subtitute the new line. Even with \\r
and with tr
.
Maybe the cut fonction will be accurate ??
echo -n
method I get
%> echo -n "hello world"
hello world% #note the new character % just appeared
%>
Upvotes: 0
Views: 70
Reputation: 9368
You can use the -n
switch that will not add the eol
echo -n "hello world"
Upvotes: 2