I've written a one-liner that will search for pattern in a file and then print the total lines that a match was found on.
Basically I was just trying to avoid 'wc -l' for fun. Is there a better way to do this?
Thanks
Code:
awk '/HCART/ && !/NONE/ { $0=a++ }; END{ print a }'
Basically I was just trying to avoid 'wc -l' for fun. Is there a better way to do this?
Thanks