grep

how can i loop through the coming frequency of the keyword

北战南征 提交于 2020-11-25 03:58:08
问题 ---- my text file from which i have to search for the keywords [name of the file --- test] <cat -Evt file> centos is my bro$ red hat is my course$ ubuntu is my OS$ fqdn is stupid $ $ $ $ tom outsmart jerry$ red hat is my boy$ jerry is samall ------ keyword file is [word.txt] <cat -Evt file > red hat$ we$ hello$ bye$ Compensation ----- my code while read "p"; do paste -d',' <(echo -n "$p" ) <(echo "searchall") <( grep -i "$p" test | wc -l) <(grep -i -A 1 -B 1 "$p" test ) done <word.txt ---- my

how can i loop through the coming frequency of the keyword

我怕爱的太早我们不能终老 提交于 2020-11-25 03:58:04
问题 ---- my text file from which i have to search for the keywords [name of the file --- test] <cat -Evt file> centos is my bro$ red hat is my course$ ubuntu is my OS$ fqdn is stupid $ $ $ $ tom outsmart jerry$ red hat is my boy$ jerry is samall ------ keyword file is [word.txt] <cat -Evt file > red hat$ we$ hello$ bye$ Compensation ----- my code while read "p"; do paste -d',' <(echo -n "$p" ) <(echo "searchall") <( grep -i "$p" test | wc -l) <(grep -i -A 1 -B 1 "$p" test ) done <word.txt ---- my