FINDOPTS=''
while getopts "i:e:" opt; do
case $opt in
e) FINDOPTS=$FINDOPTS" --exclude $OPTARG ";;
i) FINDOPTS=$FINDOPTS" --include $OPTARG ";;
esac
done
echo $FINDOPTS
$ ./getopts.sh -i path1 -i path2 -i path3 -e path4 -e path5
--include path1 --include path2 --include path3 --exclude path4 --exclude path5