echo -n and echo difference in debian 9 [on hold]
I read from a book that the -n option of the echo command will prevent echo from echoing a trailing newline. echo will echo all the characters while echo -n will only echoes five characters. Is this true? Because as I tried, echo -n still echo all the characters......
Thanks so much and happy holidays!
command-line bash debian echo
New contributor
put on hold as off-topic by George Udosen, wjandrea, Florian Diesch, dessert, N0rbert Dec 27 at 20:32
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – George Udosen, wjandrea, Florian Diesch, dessert, N0rbert
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
I read from a book that the -n option of the echo command will prevent echo from echoing a trailing newline. echo will echo all the characters while echo -n will only echoes five characters. Is this true? Because as I tried, echo -n still echo all the characters......
Thanks so much and happy holidays!
command-line bash debian echo
New contributor
put on hold as off-topic by George Udosen, wjandrea, Florian Diesch, dessert, N0rbert Dec 27 at 20:32
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – George Udosen, wjandrea, Florian Diesch, dessert, N0rbert
If this question can be reworded to fit the rules in the help center, please edit the question.
Debian is not Ubuntu. Please ask on Unix & Linux instead. BTW, you might want to mention the exact commands you tried, and the output.
– wjandrea
Dec 27 at 20:19
Thanks so much! I will do that~~
– Genie
Dec 27 at 20:21
1
... as well as what shell you are using, sinceecho
is often a shell builtin - see for example Why is printf better than echo?
– steeldriver
Dec 27 at 21:23
add a comment |
I read from a book that the -n option of the echo command will prevent echo from echoing a trailing newline. echo will echo all the characters while echo -n will only echoes five characters. Is this true? Because as I tried, echo -n still echo all the characters......
Thanks so much and happy holidays!
command-line bash debian echo
New contributor
I read from a book that the -n option of the echo command will prevent echo from echoing a trailing newline. echo will echo all the characters while echo -n will only echoes five characters. Is this true? Because as I tried, echo -n still echo all the characters......
Thanks so much and happy holidays!
command-line bash debian echo
command-line bash debian echo
New contributor
New contributor
New contributor
asked Dec 27 at 20:17
Genie
1
1
New contributor
New contributor
put on hold as off-topic by George Udosen, wjandrea, Florian Diesch, dessert, N0rbert Dec 27 at 20:32
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – George Udosen, wjandrea, Florian Diesch, dessert, N0rbert
If this question can be reworded to fit the rules in the help center, please edit the question.
put on hold as off-topic by George Udosen, wjandrea, Florian Diesch, dessert, N0rbert Dec 27 at 20:32
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – George Udosen, wjandrea, Florian Diesch, dessert, N0rbert
If this question can be reworded to fit the rules in the help center, please edit the question.
Debian is not Ubuntu. Please ask on Unix & Linux instead. BTW, you might want to mention the exact commands you tried, and the output.
– wjandrea
Dec 27 at 20:19
Thanks so much! I will do that~~
– Genie
Dec 27 at 20:21
1
... as well as what shell you are using, sinceecho
is often a shell builtin - see for example Why is printf better than echo?
– steeldriver
Dec 27 at 21:23
add a comment |
Debian is not Ubuntu. Please ask on Unix & Linux instead. BTW, you might want to mention the exact commands you tried, and the output.
– wjandrea
Dec 27 at 20:19
Thanks so much! I will do that~~
– Genie
Dec 27 at 20:21
1
... as well as what shell you are using, sinceecho
is often a shell builtin - see for example Why is printf better than echo?
– steeldriver
Dec 27 at 21:23
Debian is not Ubuntu. Please ask on Unix & Linux instead. BTW, you might want to mention the exact commands you tried, and the output.
– wjandrea
Dec 27 at 20:19
Debian is not Ubuntu. Please ask on Unix & Linux instead. BTW, you might want to mention the exact commands you tried, and the output.
– wjandrea
Dec 27 at 20:19
Thanks so much! I will do that~~
– Genie
Dec 27 at 20:21
Thanks so much! I will do that~~
– Genie
Dec 27 at 20:21
1
1
... as well as what shell you are using, since
echo
is often a shell builtin - see for example Why is printf better than echo?– steeldriver
Dec 27 at 21:23
... as well as what shell you are using, since
echo
is often a shell builtin - see for example Why is printf better than echo?– steeldriver
Dec 27 at 21:23
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Debian is not Ubuntu. Please ask on Unix & Linux instead. BTW, you might want to mention the exact commands you tried, and the output.
– wjandrea
Dec 27 at 20:19
Thanks so much! I will do that~~
– Genie
Dec 27 at 20:21
1
... as well as what shell you are using, since
echo
is often a shell builtin - see for example Why is printf better than echo?– steeldriver
Dec 27 at 21:23