Loading

shell--系统函数调用

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

输出:

posted @ 2016-08-21 00:50  头痛不头痛  阅读(387)  评论(0)    收藏  举报