bash script parameters problem
i can't figure out, where is the problem
if [ $# -eq 1 ]; then
if [ "$1"=="-h" ]; then
help
else
echo "bad parameter, if you put only one 开发者_C百科parameter, you can choose only -h"
fi
no matter what i give it as first parameter, script never gets to the else part and every time it is displaying help
Correct syntax:
if [ "$1" = "-h" ]
精彩评论