Linux shell case
#!/bin/bash
option=$1
filename=$2
case ${option} in
r)
chmod u+r ${filename}
;;
w)
chmod u+w ${filename}
;;
x)
chmod u+x ${filename}
;;
*)
echo "ERROR!!!"
exit 1
;;
esac
exit 0

被折叠的 条评论
为什么被折叠?



