운영체제/Linux
[Shell] Parameter 개수 체크하는 방법
쌍쌍바나나
2016. 6. 10. 22:00
반응형
shell script를 작성할때 parameter의 개수를 체크하는 방법입니다.
if [ "$#" -ne 1 ]; then
echo 'all'
else
VERSION=$1
echo "$VERSION"
fi
반응형