-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoption_2.sh
More file actions
executable file
·45 lines (41 loc) · 913 Bytes
/
option_2.sh
File metadata and controls
executable file
·45 lines (41 loc) · 913 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash -
#===============================================================================
#
# FILE: option_2.sh
#
# USAGE: ./option_2.sh
#
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: lishan (xviubu), xviubu@gmail.com
# ORGANIZATION: qdu
# CREATED: 2013年06月24日 22时12分35秒 CST
# REVISION: ---
#===============================================================================
set -o nounset # Treat unset variables as an error
file= verbose= quiet= long=
while getopts f:vql opt
do
case $opt in
f) file=$OPTARG
echo "option + -f"
shift
;;
v) verbose=true
quiet=
echo "option + -v"
;;
q) quiet=true
verbose=
echo "option + -q"
;;
l) long=true
echo "option + -l"
;;
esac
done
shift $((OPTIND -1)) #删除选项,留下参数