Linux中使用ECHO命令的-n选项

Linux中使用-n选项和ECHO命令有什么用.

echo -n

请给我回答详细说明.

男人回声

 -n    Do not print the trailing newline character.  This may also be achieved by appending `\c' to the end of the string, as is done
       by iBCS2 compatible systems.  Note that this option as well as the effect of `\c' are implementation-defined in IEEE Std
       1003.1-2001 (``POSIX.1'') as amended by Cor. 1-2002.  Applications aiming for maximum portability are strongly encouraged to
       use printf(1) to suppress the newline character.

Linux的许多内置命令都有一个手册页(例如man ls),这是查看手册而不必在线搜索的好方法.

翻译自:https://stackoverflow.com/questions/20499578/n-option-with-echo-command-in-linux

转载注明原文:Linux中使用ECHO命令的-n选项