Counting greps on November 30, 2020 Get link Facebook X Pinterest Email Other Apps #!/bin/bash if [ $# -eq 1 ] then echo "file log: $1 - num of occurrences: " grep -w "string to grep" $1 | wc -l else echo "no args specified: insert a file name" fi Comments
Comments