X-Git-Url: https://git.armaanb.net/?a=blobdiff_plain;f=fortune;h=3c8529425df9112d94f5657a46b12a8f89fe6f15;hb=e06b7c831ac07a505ae02a4d9958c41e9afc0786;hp=4868b1a65004cdbb69dda658951866b1cf333731;hpb=8eabed850e3f99d2da0a7eac3884bf565cd5fdba;p=bin.git diff --git a/fortune b/fortune index 4868b1a..3c85294 100755 --- a/fortune +++ b/fortune @@ -5,8 +5,10 @@ usage() { 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')" @@ -21,6 +23,13 @@ while [ "$1" != "" ]; do -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