bash echo去回车和翻译转义字符

bash echo去回车和翻译转义字符

1、去掉回车

1

$ echo -n "Enter your name:"    //echo命令

2

Enter your name:_               //提示输入

2、转义 

1  www.ahlinux.com  

$ echo -e "Enter your name:\c"  //echo命令

2

Enter your name:_               //提示输入

其中,字符'_'表示光标

作者 sxq

posted @ 2015-01-09 09:26  zdh2015  阅读(684)  评论(0编辑  收藏  举报