#!/bin/bash #description: test function echo_color() { if [ $1 == "green" ]; then echo -e "\033[32;40m$2\033[0m" elif [ $1 == "red" ]; then echo -e "\033[31;40m$2\033[0m" fi } function echo_color2() { case $1 in green) echo -e "\033[32;40m$2\033[0m";; red) echo -e "\033[31;40m$2\033[0m";; *) echo "echo_color{green|red}] string" esac } echo_color red "wodemin" echo_color2 red "lvzilong" echo_color2 green "zhangsanfeng"@H_502_0@那么奇迹出现了,嘿嘿嘿... @H_502_0@有图有真相,嘻嘻嘻... @H_502_0@
@H_502_0@如果转载请注明转于:AirZilong的博客