复制代码 代码如下:
#! /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
时间: 2024-09-20 05:24:31
复制代码 代码如下:
#! /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