I want to find all of the lines in lsof
with "Google" in them, so I tried the following:
lsof | awk '/.*google.*/ { print $1 "," $2 "," $3} ' > new_file.csv
which yields correctly an output with rows starting with the word "google".
But, then I try this and the csv contains nothing:
lsof | awk '/\s*google.*/ { print $1 "," $2 "," $3} ' > new_file.csv
But, I thought that the \s*
means any number of spaces. Is there any reason for this behavior? Thank you.