would like to write a bash program which if I type in the following:-bash-4.1$ ./sample.sh path regex keywordthat will result something like that:path/sample.txt:12path/sample.txt:34path/dir/sample1.txt:56path/dir/sample2.txt:78I have absolutely no idea how can I achieve this without using find or grep -r (but I can use grep/ sed/ awk) in bash... Please help...Thank you very much!!
How can I grep contents of files with bash only without using find or grep -r?
bash