复制代码 代码如下:
#! /bin/bash
while getopts a:bc opt
do
case $opt in
a)
echo "aaa"
echo $OPTARG
b)
echo "bb"
c)
echo "ccc"
*)
echo "error"
esac
done
复制代码 代码如下:
#! /bin/bash
while getopts a:bc opt
do
case $opt in
a)
echo "aaa"
echo $OPTARG
b)
echo "bb"
c)
echo "ccc"
*)
echo "error"
esac
done