Added 10 more gists.

This commit is contained in:
Miguel Astor
2023-06-20 22:03:49 -04:00
parent 1400a87eab
commit 22ff5bfa25
19 changed files with 1642 additions and 0 deletions

1
search.sh/README.md Normal file
View File

@@ -0,0 +1 @@
A simple script to find out which files in a bunch of files contain a certain pattern.

15
search.sh/search.sh Normal file
View File

@@ -0,0 +1,15 @@
#! /bin/bash
for i in `ls -1 "$1"`
do
if [[ -d "$1/$i" ]]
then
($0 "$1/$i" "$2")
else
cat "$1/$i" | grep "$2" > /dev/null
if [[ $? -eq 0 ]]
then
echo "$1/$i"
fi
fi
done