fix script

This commit is contained in:
David Holdeman 2021-02-15 21:47:06 -06:00
parent 42d9510807
commit 86b4915907
1 changed files with 8 additions and 0 deletions

View File

@ -24,6 +24,10 @@ searchfile() {
else
echo $link
FILES=$(find . -iname "*$(basename $link)*")
if [ $(echo -n "$FILES" | wc -c) -lt 1 ]; then
echo "Could not find"
continue
fi
echo "$FILES" | cat --number
read PICK
FILE=$(echo "$FILES" | head -n $PICK | tail -n 1)
@ -35,6 +39,10 @@ searchfile() {
fi
echo $link
FILES=$(find . -iname "*$(basename $link)*")
if [ $(echo -n "$FILES" | wc -c) -lt 1 ]; then
echo "Could not find"
continue
fi
echo "$FILES" | cat --number
read PICK
FILE=$(basename "$(echo "$FILES" | head -n $PICK | tail -n 1)" .md)