#!/bin/sh if [ -x "`which locate`" ]; then locate "$1*$2" 1>result 2>/dev/null elif [ -x "`which find`" ]; then find $1 -type f -name "*$2" 1>result 2>/dev/null else exit 1 fi echo DONE > /dev/tty