sample_if.sh
2008年08月04日 (shellscript)
source
#!/bin/sh
#sample if
if [ $1 -eq 5 ]; then
echo "$1 = 5"
elif [ $1 -lt 5 ]; then
echo "$1 < 5"
elif [ $1 -gt 5 ]; then
echo "$1 > 5"
fi
PR
Comment
source
#!/bin/sh
#sample if
if [ $1 -eq 5 ]; then
echo "$1 = 5"
elif [ $1 -lt 5 ]; then
echo "$1 < 5"
elif [ $1 -gt 5 ]; then
echo "$1 > 5"
fi