Linux打印字符串不换行
时间:2021-06-12 11:18:39
收藏:0
阅读:26
基于特殊需求,需要字符串不换行。如计算base64的值
方法1. echo -n 字符串
[root@BC-CentOS7-2 ~]# echo -n test test[root@BC-CentOS7-2 ~]#
方法2. echo -e ‘字符串\c’
[root@BC-CentOS7-2 ~]# echo -e ‘test\c‘ test[root@BC-CentOS7-2 ~]#
原文:https://www.cnblogs.com/wlinuxtop/p/14877148.html
评论(0)