Created
November 3, 2022 21:26
-
-
Save nipunthathsara/b3035510a10c74d0f8e46d5e98324789 to your computer and use it in GitHub Desktop.
Dynamic input grep script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
input=input | |
ii=0 | |
jj=0 | |
counter=0 | |
for IN in `cat $input`; do | |
# echo $IN | |
if [ $counter == 0 ] | |
then | |
ii=$IN | |
counter+=1 | |
else | |
jj=$IN | |
counter=0 | |
echo "grep -r "\"$ii\"" /Users/RM55LU/data/repos/gg/configs/*/src/main/sql | grep \"$jj\"" | |
grep -r "$ii" /Users/RM55LU/data/repos/gg/configs/*/src/main/sql | grep "$jj" | |
fi | |
# echo "1 -> $ii , 2 -> $jj " | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment