echo -n and echo difference in debian 9 [on hold]












0














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!










share|improve this question







New contributor




Genie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











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, since echo is often a shell builtin - see for example Why is printf better than echo?
    – steeldriver
    Dec 27 at 21:23
















0














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!










share|improve this question







New contributor




Genie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











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, since echo is often a shell builtin - see for example Why is printf better than echo?
    – steeldriver
    Dec 27 at 21:23














0












0








0







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!










share|improve this question







New contributor




Genie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











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






share|improve this question







New contributor




Genie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Genie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Genie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Dec 27 at 20:17









Genie

1




1




New contributor




Genie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Genie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Genie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




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, since echo 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












  • 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
















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















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Human spaceflight

Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

File:DeusFollowingSea.jpg