1.打印出彩色的格式
[root@new sbin]# cat demo.sh #/bin/bash . /etc/init.d/functions read -p "Pleas input your anwser[yes/no]: " an if [[ $an = yes ]] then action "The answer is true" /bin/true else action "Then answer is false" /bin/false fi
输出: