I have a list of command to parse…
like:
> ls -lart
> ls
> ls /etc/passwd
> ping
> ping 127.0.0.1
> PING
> LS
I have to count the number of times ls and ping was executed, I have to not count uppercase variant like LS and PING, but I have to count command launch with option like “ls -lart”
How to check if a line contain the exact word ls or ping or whatever?
With regular expression!!!
Thanks,
1 Answer