Originally Posted by walecole
i tried to count the string that are in the /etc/passwd file that contain 'er' sequence.i used this code but it the not work please can you help me with this.the code i used grep -0 '^ /etc/passwd
You do need to tell grep what it is you are looking for (er
in your case), you also used the wrong option. Try this:
grep -c "er" /etc/passwd
Do have a look at the grep manual page for details.