-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path034-quota.sh
More file actions
25 lines (21 loc) · 719 Bytes
/
Copy path034-quota.sh
File metadata and controls
25 lines (21 loc) · 719 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
#!/bin/sh
# newquota - a front-end to quota that works with fullword flags a la GNU
# quota has three possible flags: -g, -v and -q and in this script
# we allow them to be '--group' '--verbose' and '--quiet' too:
flags=""
realquota="/usr/bin/quota"
while [ $# -gt 0 ]
do
echo checking flag $1
case $1
in
--help ) echo "Usage: $0 [--group --verbose --quiet -gvq]" >&2
exit 1 ;;
--group | -group) flags="$flags -g"; shift ;;
--verbose | -verbose) flags="$flags -v"; shift ;;
--quiet | -quiet) flags="$flags -q"; shift ;;
-- ) shift; break ;;
* ) break; # done with 'while' loop!
esac
done
exec $realquota $flags "$@"