首页 > 系统服务 > 详细

Linux打印字符串不换行

时间:2021-06-12 11:18:39      阅读:21      评论:0      收藏:0      [点我收藏+]

基于特殊需求,需要字符串不换行。如计算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 ~]# 

 

Linux打印字符串不换行

原文:https://www.cnblogs.com/wlinuxtop/p/14877148.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!