shell脚本学习总结10--系统函数调用

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

输出:

原文地址:https://www.cnblogs.com/zydev/p/5791694.html