Next command output on the same line? Bash scriptSet bash script output to the line that called bash scriptprint the output of 2 commands in 1 file on the same lineBash: How do I make a command line call a script and pass two strings?How use an if statement to change the output messagereformatting command output within bash scriptBash print current line, line's output, and linebreak to filegrep script - output lines at the same time into echofind command not giving any outputvariable content is different than the output of the assigned commandHow to get du -ksh working without a carriage return in shell-scripting?
show stdout containing n with line breaks
Acceptable to cut steak before searing?
Why aren’t emergency services using callsigns?
Can a spacecraft use an accelerometer to determine its orientation?
Ordering a word list
If a Contingency spell has been cast on a creature, does the Simulacrum spell transfer the contingent spell to its duplicate?
Y2K... in 2019?
PHP santization of textarea input
Best gun to modify into a monsterhunter weapon?
Why are the inside diameters of some pipe larger than the stated size?
In a topological space if there exists a loop that cannot be contracted to a point does there exist a simple loop that cannot be contracted also?
Was the 2019 Lion King film made through motion capture?
How do I calculate the difference in lens reach between a superzoom compact and a DSLR zoom lens?
Is refreshing multiple times a test case for web applications?
What are good ways to improve as a writer other than writing courses?
Do other countries guarantee freedoms that the United States does not have?
Does this Foo machine halt?
First amendment and employment: Can an employer terminate you for speech?
As a 16 year old, how can I keep my money safe from my mother?
Does a code snippet compile? Or does it get compiled?
Does two puncture wounds mean venomous snake?
Dereferencing a pointer in a 'for' loop initializer creates a segmentation fault
Can I call myself an assistant professor without a PhD?
How can you evade tax by getting employment income just in equity, then using this equity as collateral to take out loan?
Next command output on the same line? Bash script
Set bash script output to the line that called bash scriptprint the output of 2 commands in 1 file on the same lineBash: How do I make a command line call a script and pass two strings?How use an if statement to change the output messagereformatting command output within bash scriptBash print current line, line's output, and linebreak to filegrep script - output lines at the same time into echofind command not giving any outputvariable content is different than the output of the assigned commandHow to get du -ksh working without a carriage return in shell-scripting?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have the following simple script:
echo "-------------------------- SOA --------------------------------"
echo " "
echo -n " ---------> "; dig soa "$1" +short | awk 'print $3'
The output is something like this:
-------------------------- SOA --------------------------------
---------> 2019072905
Now my question is can I make an "echo" command after the dig and the output to be something like this:
-------------------------- SOA -----------------------------
---------> 2019072905 <-------------
I have tried to search for similar cases but was not able to find any related.
Would this be possible?
Thanks in advance.
bash shell-script echo output
add a comment |
I have the following simple script:
echo "-------------------------- SOA --------------------------------"
echo " "
echo -n " ---------> "; dig soa "$1" +short | awk 'print $3'
The output is something like this:
-------------------------- SOA --------------------------------
---------> 2019072905
Now my question is can I make an "echo" command after the dig and the output to be something like this:
-------------------------- SOA -----------------------------
---------> 2019072905 <-------------
I have tried to search for similar cases but was not able to find any related.
Would this be possible?
Thanks in advance.
bash shell-script echo output
add a comment |
I have the following simple script:
echo "-------------------------- SOA --------------------------------"
echo " "
echo -n " ---------> "; dig soa "$1" +short | awk 'print $3'
The output is something like this:
-------------------------- SOA --------------------------------
---------> 2019072905
Now my question is can I make an "echo" command after the dig and the output to be something like this:
-------------------------- SOA -----------------------------
---------> 2019072905 <-------------
I have tried to search for similar cases but was not able to find any related.
Would this be possible?
Thanks in advance.
bash shell-script echo output
I have the following simple script:
echo "-------------------------- SOA --------------------------------"
echo " "
echo -n " ---------> "; dig soa "$1" +short | awk 'print $3'
The output is something like this:
-------------------------- SOA --------------------------------
---------> 2019072905
Now my question is can I make an "echo" command after the dig and the output to be something like this:
-------------------------- SOA -----------------------------
---------> 2019072905 <-------------
I have tried to search for similar cases but was not able to find any related.
Would this be possible?
Thanks in advance.
bash shell-script echo output
bash shell-script echo output
asked Jul 30 at 11:28
MiroMiro
273 bronze badges
273 bronze badges
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
I would do the whole thing in printf
instead:
#!/bin/sh
header='-------------------------- SOA --------------------------'
headerLength=$(awk 'print length()' <<<"$header")
value=$(dig soa "$1" +short | awk 'print $3')
valueString="-----------> $value <-------------"
valueLength=$(awk 'print length()' <<<"$valueString")
offset=$(((headerLength + valueLength)/2+1))
printf "%snn%$offsetsn" "$header" "$valueString"
This has the advantage of always appearing centered no matter what the length of your value is (using a slightly modified version that just sets value=$1
to illustrate):
$ foo.sh 2019072905
-------------------------- SOA --------------------------------
-----------> 2019072905 <-------------
$ foo.sh "some random long string"
-------------------------- SOA --------------------------------
-----------> some random long string <-------------
$ foo.sh "foo"
-------------------------- SOA --------------------------
-----------> foo <-------------
Thanks for your advice. Will check this out with 'printf' also.
– Miro
Jul 30 at 12:20
add a comment |
#!/bin/sh
soa=$(dig soa "$1" +short | awk 'print $3')
cat <<__EOF__
-------------------------- SOA -----------------------------
---------> $soa <-------------
__EOF__
BTW, I think the question is wrong-headed because printing all that header garbage around the SOA just makes it pointlessly harder to use the output of this script as input to another script...and even when you don't currently think you'll ever need to do that, in future you might. Verbosity in output is a "sin" in unix :) - when writing a script, you should always be thinking that your output could end up being someone else's (including yourself) input.
I would have ignored the question, but I disliked the other answer even more. If you're going to do something wrong, you may as well do it properly.
Thank you for your advice. Will have this in mind. Atm, this is only for personal use combining several commands in a small script.
– Miro
Jul 30 at 12:10
that's cool. i have no objection to you doing whatever you want for your own needs or education....but that answer combining the output ofdig ... |awk ...
with the echo statement just irked me. it's bad coding style and it's teaching bad habits.
– cas
Jul 30 at 12:27
add a comment |
cmd=$(dig soa "$1" +short | awk 'print $3'; echo -n <----------;)
echo "-------------------------- SOA --------------------------------"
echo " "
echo -n " ---------> ";echo $cmd
Thanks. This is indeed something that I was looking for.
– Miro
Jul 30 at 12:11
add a comment |
I don't have dig so used echo in it's place for this example:
$ echo '2019072905' | awk '
BEGIN d=sprintf("%15s",""); gsub(/ /,"-",d); print d d, "SOA", d d ORS
printf "%*s> %s <%sn", 2*length(d)-length($0)/2+1, d, $0, d
'
------------------------------ SOA ------------------------------
---------------> 2019072905 <---------------
$ echo '201' | awk '
BEGIN d=sprintf("%15s",""); gsub(/ /,"-",d); print d d, "SOA", d d ORS
printf "%*s> %s <%sn", 2*length(d)-length($0)/2+1, d, $0, d
'
------------------------------ SOA ------------------------------
---------------> 201 <---------------
$ echo '12345672019072905' | awk '
BEGIN d=sprintf("%15s",""); gsub(/ /,"-",d); print d d, "SOA", d d ORS
printf "%*s> %s <%sn", 2*length(d)-length($0)/2+1, d, $0, d
'
------------------------------ SOA ------------------------------
---------------> 12345672019072905 <---------------
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f532938%2fnext-command-output-on-the-same-line-bash-script%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
I would do the whole thing in printf
instead:
#!/bin/sh
header='-------------------------- SOA --------------------------'
headerLength=$(awk 'print length()' <<<"$header")
value=$(dig soa "$1" +short | awk 'print $3')
valueString="-----------> $value <-------------"
valueLength=$(awk 'print length()' <<<"$valueString")
offset=$(((headerLength + valueLength)/2+1))
printf "%snn%$offsetsn" "$header" "$valueString"
This has the advantage of always appearing centered no matter what the length of your value is (using a slightly modified version that just sets value=$1
to illustrate):
$ foo.sh 2019072905
-------------------------- SOA --------------------------------
-----------> 2019072905 <-------------
$ foo.sh "some random long string"
-------------------------- SOA --------------------------------
-----------> some random long string <-------------
$ foo.sh "foo"
-------------------------- SOA --------------------------
-----------> foo <-------------
Thanks for your advice. Will check this out with 'printf' also.
– Miro
Jul 30 at 12:20
add a comment |
I would do the whole thing in printf
instead:
#!/bin/sh
header='-------------------------- SOA --------------------------'
headerLength=$(awk 'print length()' <<<"$header")
value=$(dig soa "$1" +short | awk 'print $3')
valueString="-----------> $value <-------------"
valueLength=$(awk 'print length()' <<<"$valueString")
offset=$(((headerLength + valueLength)/2+1))
printf "%snn%$offsetsn" "$header" "$valueString"
This has the advantage of always appearing centered no matter what the length of your value is (using a slightly modified version that just sets value=$1
to illustrate):
$ foo.sh 2019072905
-------------------------- SOA --------------------------------
-----------> 2019072905 <-------------
$ foo.sh "some random long string"
-------------------------- SOA --------------------------------
-----------> some random long string <-------------
$ foo.sh "foo"
-------------------------- SOA --------------------------
-----------> foo <-------------
Thanks for your advice. Will check this out with 'printf' also.
– Miro
Jul 30 at 12:20
add a comment |
I would do the whole thing in printf
instead:
#!/bin/sh
header='-------------------------- SOA --------------------------'
headerLength=$(awk 'print length()' <<<"$header")
value=$(dig soa "$1" +short | awk 'print $3')
valueString="-----------> $value <-------------"
valueLength=$(awk 'print length()' <<<"$valueString")
offset=$(((headerLength + valueLength)/2+1))
printf "%snn%$offsetsn" "$header" "$valueString"
This has the advantage of always appearing centered no matter what the length of your value is (using a slightly modified version that just sets value=$1
to illustrate):
$ foo.sh 2019072905
-------------------------- SOA --------------------------------
-----------> 2019072905 <-------------
$ foo.sh "some random long string"
-------------------------- SOA --------------------------------
-----------> some random long string <-------------
$ foo.sh "foo"
-------------------------- SOA --------------------------
-----------> foo <-------------
I would do the whole thing in printf
instead:
#!/bin/sh
header='-------------------------- SOA --------------------------'
headerLength=$(awk 'print length()' <<<"$header")
value=$(dig soa "$1" +short | awk 'print $3')
valueString="-----------> $value <-------------"
valueLength=$(awk 'print length()' <<<"$valueString")
offset=$(((headerLength + valueLength)/2+1))
printf "%snn%$offsetsn" "$header" "$valueString"
This has the advantage of always appearing centered no matter what the length of your value is (using a slightly modified version that just sets value=$1
to illustrate):
$ foo.sh 2019072905
-------------------------- SOA --------------------------------
-----------> 2019072905 <-------------
$ foo.sh "some random long string"
-------------------------- SOA --------------------------------
-----------> some random long string <-------------
$ foo.sh "foo"
-------------------------- SOA --------------------------
-----------> foo <-------------
answered Jul 30 at 12:06
terdon♦terdon
140k34 gold badges287 silver badges466 bronze badges
140k34 gold badges287 silver badges466 bronze badges
Thanks for your advice. Will check this out with 'printf' also.
– Miro
Jul 30 at 12:20
add a comment |
Thanks for your advice. Will check this out with 'printf' also.
– Miro
Jul 30 at 12:20
Thanks for your advice. Will check this out with 'printf' also.
– Miro
Jul 30 at 12:20
Thanks for your advice. Will check this out with 'printf' also.
– Miro
Jul 30 at 12:20
add a comment |
#!/bin/sh
soa=$(dig soa "$1" +short | awk 'print $3')
cat <<__EOF__
-------------------------- SOA -----------------------------
---------> $soa <-------------
__EOF__
BTW, I think the question is wrong-headed because printing all that header garbage around the SOA just makes it pointlessly harder to use the output of this script as input to another script...and even when you don't currently think you'll ever need to do that, in future you might. Verbosity in output is a "sin" in unix :) - when writing a script, you should always be thinking that your output could end up being someone else's (including yourself) input.
I would have ignored the question, but I disliked the other answer even more. If you're going to do something wrong, you may as well do it properly.
Thank you for your advice. Will have this in mind. Atm, this is only for personal use combining several commands in a small script.
– Miro
Jul 30 at 12:10
that's cool. i have no objection to you doing whatever you want for your own needs or education....but that answer combining the output ofdig ... |awk ...
with the echo statement just irked me. it's bad coding style and it's teaching bad habits.
– cas
Jul 30 at 12:27
add a comment |
#!/bin/sh
soa=$(dig soa "$1" +short | awk 'print $3')
cat <<__EOF__
-------------------------- SOA -----------------------------
---------> $soa <-------------
__EOF__
BTW, I think the question is wrong-headed because printing all that header garbage around the SOA just makes it pointlessly harder to use the output of this script as input to another script...and even when you don't currently think you'll ever need to do that, in future you might. Verbosity in output is a "sin" in unix :) - when writing a script, you should always be thinking that your output could end up being someone else's (including yourself) input.
I would have ignored the question, but I disliked the other answer even more. If you're going to do something wrong, you may as well do it properly.
Thank you for your advice. Will have this in mind. Atm, this is only for personal use combining several commands in a small script.
– Miro
Jul 30 at 12:10
that's cool. i have no objection to you doing whatever you want for your own needs or education....but that answer combining the output ofdig ... |awk ...
with the echo statement just irked me. it's bad coding style and it's teaching bad habits.
– cas
Jul 30 at 12:27
add a comment |
#!/bin/sh
soa=$(dig soa "$1" +short | awk 'print $3')
cat <<__EOF__
-------------------------- SOA -----------------------------
---------> $soa <-------------
__EOF__
BTW, I think the question is wrong-headed because printing all that header garbage around the SOA just makes it pointlessly harder to use the output of this script as input to another script...and even when you don't currently think you'll ever need to do that, in future you might. Verbosity in output is a "sin" in unix :) - when writing a script, you should always be thinking that your output could end up being someone else's (including yourself) input.
I would have ignored the question, but I disliked the other answer even more. If you're going to do something wrong, you may as well do it properly.
#!/bin/sh
soa=$(dig soa "$1" +short | awk 'print $3')
cat <<__EOF__
-------------------------- SOA -----------------------------
---------> $soa <-------------
__EOF__
BTW, I think the question is wrong-headed because printing all that header garbage around the SOA just makes it pointlessly harder to use the output of this script as input to another script...and even when you don't currently think you'll ever need to do that, in future you might. Verbosity in output is a "sin" in unix :) - when writing a script, you should always be thinking that your output could end up being someone else's (including yourself) input.
I would have ignored the question, but I disliked the other answer even more. If you're going to do something wrong, you may as well do it properly.
edited Jul 30 at 11:59
answered Jul 30 at 11:50
cascas
41.1k4 gold badges59 silver badges110 bronze badges
41.1k4 gold badges59 silver badges110 bronze badges
Thank you for your advice. Will have this in mind. Atm, this is only for personal use combining several commands in a small script.
– Miro
Jul 30 at 12:10
that's cool. i have no objection to you doing whatever you want for your own needs or education....but that answer combining the output ofdig ... |awk ...
with the echo statement just irked me. it's bad coding style and it's teaching bad habits.
– cas
Jul 30 at 12:27
add a comment |
Thank you for your advice. Will have this in mind. Atm, this is only for personal use combining several commands in a small script.
– Miro
Jul 30 at 12:10
that's cool. i have no objection to you doing whatever you want for your own needs or education....but that answer combining the output ofdig ... |awk ...
with the echo statement just irked me. it's bad coding style and it's teaching bad habits.
– cas
Jul 30 at 12:27
Thank you for your advice. Will have this in mind. Atm, this is only for personal use combining several commands in a small script.
– Miro
Jul 30 at 12:10
Thank you for your advice. Will have this in mind. Atm, this is only for personal use combining several commands in a small script.
– Miro
Jul 30 at 12:10
that's cool. i have no objection to you doing whatever you want for your own needs or education....but that answer combining the output of
dig ... |awk ...
with the echo statement just irked me. it's bad coding style and it's teaching bad habits.– cas
Jul 30 at 12:27
that's cool. i have no objection to you doing whatever you want for your own needs or education....but that answer combining the output of
dig ... |awk ...
with the echo statement just irked me. it's bad coding style and it's teaching bad habits.– cas
Jul 30 at 12:27
add a comment |
cmd=$(dig soa "$1" +short | awk 'print $3'; echo -n <----------;)
echo "-------------------------- SOA --------------------------------"
echo " "
echo -n " ---------> ";echo $cmd
Thanks. This is indeed something that I was looking for.
– Miro
Jul 30 at 12:11
add a comment |
cmd=$(dig soa "$1" +short | awk 'print $3'; echo -n <----------;)
echo "-------------------------- SOA --------------------------------"
echo " "
echo -n " ---------> ";echo $cmd
Thanks. This is indeed something that I was looking for.
– Miro
Jul 30 at 12:11
add a comment |
cmd=$(dig soa "$1" +short | awk 'print $3'; echo -n <----------;)
echo "-------------------------- SOA --------------------------------"
echo " "
echo -n " ---------> ";echo $cmd
cmd=$(dig soa "$1" +short | awk 'print $3'; echo -n <----------;)
echo "-------------------------- SOA --------------------------------"
echo " "
echo -n " ---------> ";echo $cmd
answered Jul 30 at 11:42
Rasool ZiafatyRasool Ziafaty
1249 bronze badges
1249 bronze badges
Thanks. This is indeed something that I was looking for.
– Miro
Jul 30 at 12:11
add a comment |
Thanks. This is indeed something that I was looking for.
– Miro
Jul 30 at 12:11
Thanks. This is indeed something that I was looking for.
– Miro
Jul 30 at 12:11
Thanks. This is indeed something that I was looking for.
– Miro
Jul 30 at 12:11
add a comment |
I don't have dig so used echo in it's place for this example:
$ echo '2019072905' | awk '
BEGIN d=sprintf("%15s",""); gsub(/ /,"-",d); print d d, "SOA", d d ORS
printf "%*s> %s <%sn", 2*length(d)-length($0)/2+1, d, $0, d
'
------------------------------ SOA ------------------------------
---------------> 2019072905 <---------------
$ echo '201' | awk '
BEGIN d=sprintf("%15s",""); gsub(/ /,"-",d); print d d, "SOA", d d ORS
printf "%*s> %s <%sn", 2*length(d)-length($0)/2+1, d, $0, d
'
------------------------------ SOA ------------------------------
---------------> 201 <---------------
$ echo '12345672019072905' | awk '
BEGIN d=sprintf("%15s",""); gsub(/ /,"-",d); print d d, "SOA", d d ORS
printf "%*s> %s <%sn", 2*length(d)-length($0)/2+1, d, $0, d
'
------------------------------ SOA ------------------------------
---------------> 12345672019072905 <---------------
add a comment |
I don't have dig so used echo in it's place for this example:
$ echo '2019072905' | awk '
BEGIN d=sprintf("%15s",""); gsub(/ /,"-",d); print d d, "SOA", d d ORS
printf "%*s> %s <%sn", 2*length(d)-length($0)/2+1, d, $0, d
'
------------------------------ SOA ------------------------------
---------------> 2019072905 <---------------
$ echo '201' | awk '
BEGIN d=sprintf("%15s",""); gsub(/ /,"-",d); print d d, "SOA", d d ORS
printf "%*s> %s <%sn", 2*length(d)-length($0)/2+1, d, $0, d
'
------------------------------ SOA ------------------------------
---------------> 201 <---------------
$ echo '12345672019072905' | awk '
BEGIN d=sprintf("%15s",""); gsub(/ /,"-",d); print d d, "SOA", d d ORS
printf "%*s> %s <%sn", 2*length(d)-length($0)/2+1, d, $0, d
'
------------------------------ SOA ------------------------------
---------------> 12345672019072905 <---------------
add a comment |
I don't have dig so used echo in it's place for this example:
$ echo '2019072905' | awk '
BEGIN d=sprintf("%15s",""); gsub(/ /,"-",d); print d d, "SOA", d d ORS
printf "%*s> %s <%sn", 2*length(d)-length($0)/2+1, d, $0, d
'
------------------------------ SOA ------------------------------
---------------> 2019072905 <---------------
$ echo '201' | awk '
BEGIN d=sprintf("%15s",""); gsub(/ /,"-",d); print d d, "SOA", d d ORS
printf "%*s> %s <%sn", 2*length(d)-length($0)/2+1, d, $0, d
'
------------------------------ SOA ------------------------------
---------------> 201 <---------------
$ echo '12345672019072905' | awk '
BEGIN d=sprintf("%15s",""); gsub(/ /,"-",d); print d d, "SOA", d d ORS
printf "%*s> %s <%sn", 2*length(d)-length($0)/2+1, d, $0, d
'
------------------------------ SOA ------------------------------
---------------> 12345672019072905 <---------------
I don't have dig so used echo in it's place for this example:
$ echo '2019072905' | awk '
BEGIN d=sprintf("%15s",""); gsub(/ /,"-",d); print d d, "SOA", d d ORS
printf "%*s> %s <%sn", 2*length(d)-length($0)/2+1, d, $0, d
'
------------------------------ SOA ------------------------------
---------------> 2019072905 <---------------
$ echo '201' | awk '
BEGIN d=sprintf("%15s",""); gsub(/ /,"-",d); print d d, "SOA", d d ORS
printf "%*s> %s <%sn", 2*length(d)-length($0)/2+1, d, $0, d
'
------------------------------ SOA ------------------------------
---------------> 201 <---------------
$ echo '12345672019072905' | awk '
BEGIN d=sprintf("%15s",""); gsub(/ /,"-",d); print d d, "SOA", d d ORS
printf "%*s> %s <%sn", 2*length(d)-length($0)/2+1, d, $0, d
'
------------------------------ SOA ------------------------------
---------------> 12345672019072905 <---------------
answered Jul 31 at 5:32
Ed MortonEd Morton
1,2464 silver badges9 bronze badges
1,2464 silver badges9 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f532938%2fnext-command-output-on-the-same-line-bash-script%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown