diff options
Diffstat (limited to 'show')
-rwxr-xr-x | show | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -0,0 +1,18 @@ +#!/bin/bash +# +# View a document. +# + +# Parameters +BASENAME="`basename $0`" +DOCS="$HOME/data/doc" +ITEM="$1" + +# Check +if [ -z "$ITEM" ]; then + echo "usage: $BASENAME <item-name>" + exit 1 +fi + +# Dispatch +find $DOCS -iname "*$ITEM*" | head -1 | while read item; do xdg-open "$item"; done |