add new scripts

This commit is contained in:
jonathan.wyss
2025-08-13 09:19:23 +02:00
parent dcbfb937bf
commit 4319445cd3
3 changed files with 38 additions and 0 deletions

17
find_file_containing Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
echo "cmd filetype searchtearm"
echo "example:"
echo "find_file_containing *.ts* setToast"
files=$(find ./ -iname "$1")
for file in $files; do
res=$(cat $file | grep -B 2 -A 3 $2)
if [ -n "$res" ]; then
echo -e "\e[31m"
echo $file
echo -e "\e[0m"
echo $res
fi
unset res
done
echo $1 $2