Here is a script to index the stuff
Well idk if this would work... oh well
# Ex: matches [ -q ] string globpattern
# Does $1 match the glob expr $2 ?
# -q flag = set return status to 0 (true) or 1 (false)
# no -q flag = echo "1" (true) or "0" (false)
# Unfortunately, the return status is opposite from the echo'ed string
globmatches () {
if [ $1 = "-q" ]; then
shift
case "$1" in
$2 ) true ;;
* ) false ;;
esac
else
case "$1" in
$2 ) echo 1 ; true ;;
* ) echo 0 ; false ;;
esac
fi
}
if globmatches -q $file "*.txt" ; then
echo "Found a txt file"
elif globmatches -q $file "*pdf" ; then
echo "Found a pdf file"
if
|
Recent comments
1 day 43 min ago
1 day 5 hours ago
1 day 7 hours ago
1 day 8 hours ago
1 day 9 hours ago
1 day 14 hours ago
1 day 15 hours ago
1 day 17 hours ago
2 days 6 hours ago
2 days 7 hours ago