0
그래서 당신은 알고있다, 당신은 당신의 표준 getopts
설정 할 : 제가 알기로무엇의 차이점은 무엇입니까? * 배시에서?
while getopts :a:bc option
do
case "${option}"
in
a)
# do a manditory thing!
;;
b)
# do a optional thing!
;;
c)
# for real, you usually would set variables using getopts
;;
?) # unexpected flag(?)
echo "FATAL: Unexpected flag ${OPTARG}"
exit 2
;;
*) # litterally nothing entered(?)
show_help
exit 1
;;
esac
done
을 ?
정의 이외의 플래그를 위해, 그리고 *
입력 인수가없는 경우입니다. 그러나, 나는 확실하지 않다 .... 배쉬에서 물음표 및 별표 사이