在命令行界面可以輸出顏色但是在shell下同樣的命令就不識(shí)別
linux-grnn /root# echo "\e[1;31m嫁人就要嫁鳳\e[0m"
嫁人就要嫁鳳
linux-grnn /root# vi hello.sh
linux-grnn /root# vi hello.sh
linux-grnn /root# bas
base32?? base64?? basename bash???? bashbug ?
linux-grnn /root# bash
bash??? bashbug
linux-grnn /root# bash hello.sh
\e[1;31m嫁人就要嫁鳳\e[0m
linux-grnn /root# more hello.sh
#!/bin/bash
# The first program
echo "\e[1;31m嫁人就要嫁鳳\e[0m"
2018-07-18
我用的suse12練習(xí),命令行必須不加-e就可以輸出,但是bash下又必須加-e才能輸出
2018-07-18
好了已經(jīng)