Grep pattern Matching Doesn't work?
Solution 1:
Quotes are characters too - your files doesn't contain May,25
, it contains "May",25
. So
grep '"May",25' "$1"
or
grep "\"May\",25" "$1"
(but not grep "\"May\" ,25" "$1"
- spaces are characters as well).
Or you can use a CSV aware tool that understands CSV quoting:
mlr --csv filter 'Month == "May" && Day == 25'
csvgrep -c Month -m May "$1" | csvgrep -c Day -m 25