blob: a3c6ff503d87fd96549fef614d7f9a928c372b25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/bash
#
# View a document.
#
# Parameters
BASENAME="`basename $0`"
DOCS="$HOME/data/doc"
LIST="$DOCS/.filelist"
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
grep "$ITEM" $LIST | while read item; do xdg-open "$item"; done
|