Hi, I am having a lot of issues using grep. I am trying to counts the number of lines which start with the letter “L”or “W” and end with the number 3.
I can find and count the lines that start with L or W just fine, but I cannot get it to work when i add the bit about the line ending with the number 3.
here is one of the lines it should pick up:
Lylac, Kenneth R. BS UNDECLARED 3.403
Starts with an L and ends with a 3.
so far i have tried just about everything to get it to work. Here is what i have working so far:
$ grep -c '^[L,W]' rolllist.txt
I know the $ is gets the end of the line, but i cant get it to work.
Any help would be much appreciated.