标签:amp blog ase base log div 学习 shel 应该
如果脚本错误退出,一个好习惯是显示脚本名并将之定向到标准错误中。用户应该知道产生错误的脚本名
#!/bin/sh # ifcp.sh if cp myfile myfile.bak > /dev/null 2>&1; then echo "good copy" else echo "`basename $0`: error could not copy the file" >&2 fi
标签:amp blog ase base log div 学习 shel 应该
原文地址:http://www.cnblogs.com/neo-01/p/7747653.html