mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-11 03:39:59 +00:00
17 lines
303 B
Bash
17 lines
303 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
for i in "${@:2}"
|
||
|
do
|
||
|
RESULT=$(IFS=:;find $PATH -maxdepth 1 -name "$i" -print -quit 2> /dev/null | grep -o '[^/]*$')
|
||
|
COUNT=$(echo "$RESULT" | wc -c)
|
||
|
|
||
|
if [ $COUNT -gt 1 ]
|
||
|
then
|
||
|
echo $RESULT
|
||
|
exit 0
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
echo $1
|
||
|
exit 0
|