Issue
I want to search for strings that do not match a regex. I used:
grep -v -E '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}' myfile.txt | wc -l
But I get:
$: command not found
I need to find the strings that do not comply to digits.digits.digits.digits
. The digits
length is 1-3.
Solution
The comments provided by Wiktor Stribiżew and Ed Morton give insight into what the problem is. In order to find a solution to the problem, more information is to be sought. The output of the following would be helpful:
echo $PATH
This tells you which folders are checked when looking for commands. If the folder where grep is installed is not in that list, then the OS will not know where to find it.
Answered By - HackerBoss