{
echo "fortune -- a simple awk/POSIX sh implementation of fortune"
echo ""
- echo "\t-h --help show this help message"
- echo "\t--file=\$FILE specify path to cookie file"
+ echo "\t-h, --help show this help message"
+ echo "\t-l, --list=\$FILE list installed cookie files"
+ echo "\t-f=\$FILE, --file=\$FILE specify path to cookie file"
+ echo "\t-c=\$FILE, --cookie=\$FILE specify cookie file"
}
FILE="$(find /usr/share/fortune/ -type f -not -name '*.dat')"
-f | --file)
FILE=$VALUE
;;
+ -c | --cookie)
+ FILE=/usr/share/fortune/$VALUE
+ ;;
+ -l | --list)
+ ls -1 /usr/share/fortune
+ exit
+ ;;
*)
echo "ERROR: unknown parameter \"$PARAM\""
usage