FILE="$(find /usr/share/fortune/ -type f -not -name '*.dat')"
while [ "$1" != "" ]; do
case $1 in
- -h | --help)
- usage
- exit
- ;;
- -f | --file)
- FILE=$2
- ;;
- -c | --cookie)
- FILE=/usr/share/fortune/$2
- ;;
- -l | --list)
- ls -1 /usr/share/fortune
- exit
- ;;
- *)
- echo "ERROR: unknown parameter \"$2\""
- usage
- exit 1
- ;;
+ -h | --help)
+ usage
+ exit
+ ;;
+ -f | --file)
+ FILE=$2
+ ;;
+ -c | --cookie)
+ FILE=/usr/share/fortune/$2
+ ;;
+ -l | --list)
+ ls -1 /usr/share/fortune
+ exit
+ ;;
+ *)
+ echo "ERROR: unknown parameter \"$2\""
+ usage
+ exit 1
+ ;;
esac
shift 2
done
-awk '
-BEGIN {
+awk 'BEGIN {
f++
}