[root@localhost advanced_shell_script]# cat test15.sh #!/bin/bash #!/bin/bash # echo -e
# 默認情況下,echo命令只顯示可打印文本字符。在創建菜單項時,非可打印字符通常也很有用,比如制表符和換行符。要在echo命令中包含這些字符,必須用-e選項
echo -e "\tshell test " # \t 制表符 ,相當於tab 鍵 echo -e "\n123\n456" #\n 回車 echo -e "\n\t123\n\t456" #\n\t 回車制表符 echo -e "123\r456\r" # \r 換行回到下一行行首,這里覆蓋了前面的內容 [root@localhost advanced_shell_script]# ./test15.sh shell test 123 456 123 456 456 [root@localhost advanced_shell_script]#