shell去掉输出的末尾换行符

阅读量: searchstar Created: 2021-08-19 17:37:27 Updated: 2022-02-18 12:25:38
Categories: Tags:

echo -n $(you_command)即可。

比如:

echo -n $(echo test)

输出:

[searchstar@localhost ~]$ echo -n $(echo test)
test[searchstar@localhost ~]$