find, findfile

This commit is contained in:
Mike Dilger 2022-12-20 18:28:45 +13:00
parent bbe7bb642b
commit 1345fc2d46
3 changed files with 11 additions and 0 deletions

4
filescontaining.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
find . -name .git -prune -o -name target -prune -o -type f -exec grep -H "$1" {} \; \
| awk -F: '{print $1}' | uniq

3
find.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
find . -name .git -prune -o -name target -prune -o -type f -exec grep -H "$1" {} \;

4
findfile.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
find . -name .git -prune -o -name target -prune -o -name "$1" -print