Skip to content

Commit

Permalink
Merge pull request #1 from mattcen/fix-find-by-name
Browse files Browse the repository at this point in the history
fix: Make find_by_name work with sh
  • Loading branch information
devjack authored Nov 21, 2024
2 parents 51b7150 + 6ff832a commit 7724440
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions find_by_name
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
#!/bin/bash
(( $# < 1 )) && {
#!/bin/sh
[ "$#" -lt 1 ] && {
echo "Usage: $0 search_term"
exit 1
}
files=()
while read -r file;
do
files+=("$file")
done < <(grep -l -i "$*" output/svgs/*.svg | sed 's/output/svg/pdf/g')
printf 'Matches:\n'
printf '%s\n' "${files[@]}"
grep -l -i "$*" output/svgs/*.svg | sed 's/svg/pdf/g'

0 comments on commit 7724440

Please sign in to comment.