What is difference when we use |+ operator in getopts of ksh ?
Examples of code are
while getopts d: o
do case "$o" in
d|+d) seplist="$OPTARG";;
esac
done
echo $seplist
and
while getopts d: o
do case "$o" in
d) seplist="$OPTARG";;
esac
done
echo $seplist
The operator |
means or , so d|+d)
means d
or +d
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.