0
Here's the head of my file:
id,date,section,identifier,action,level,user_id,week,month,seconds_since_start
9464384,334600,12,,complete,4,1124822691805,1,1,1
9464413,334626,12,,complete,4,1124822691805,1,1,1
9464430,334659,12,,complete,4,1124822691805,1,1,1
9464470,334692,12,,complete,4,1124822691805,1,1,1
9464560,334772,12,,complete,4,1124822691805,1,1,1
9464756,335003,12,,complete,4,1124822691805,1,1,-1
I am having trouble using grep and simple regular expressions from mintty (as installed with git) on Windows Server 2016
I want to know if any lines end with a minus number, so the command I was hoping would work was:
grep '-[0-9]+$' file.csv
That finds no matches. I can simplify the regex even further, this one also finds no matches:
grep '1$' file.csv
I have tried replacing single ticks with double (following here), and replacing grep with egrep, but those changes make no difference.
Am I missing something obvious?
These PowerShell commands do work:
Select-String -Path .\file.csv -Pattern '1$'
&Select-String -Path .\file.csv -Pattern '-[0-9]+$'
– dumbledad – 2019-04-16T15:46:32.670