HI
I have log files generated by 3rd party application that are named like this
acct-2013-11-14-0000.csv.gz
acct-2013-11-14-0001.csv.gz
acct-2013-11-15-0000.csv.gz
acct-2013-11-15-0001.csv.gz
acct-2013-11-15-0002.csv.gz
I need to find lines containing a string, so when I do
Code:
$ zgrep mystring ./acct*
I get the result, bu when I try narrowing the search to a particular month like this
Code:
$ zgrep mystring ./acct-2013-11*
I get nothing
When googling the issue I found that hyphen (-) is a special character and that's where my problem comes from. I tried escaping it ( ./acct\-2013\-11* ), but no luck. Any idea how to grep in files containing hyphens ?