So I've been trying to use grep
to extract some stuff from a Mercurial log and trying to avoid using awk
just to see if I can get by without it here, and failing because neither grep
nor egrep
support full modern regex.
So this happens with grep:
$ hg log <filename> | grep changeset
changeset: 3651:d23495ab1168
changeset: 2974:6aa71cb2c575
changeset: 2756:9dd7fb635678
changeset: 2532:d3ced9af4d6c
changeset: 2459:9d5f5553b851
changeset: 1835:4558836beed1
changeset: 1628:517d0239e830
changeset: 1486:114bce51254d
changeset: 1378:2b968e7fbd19
changeset: 1374:4e7772e48d00
This is what I want in terms of output results. But to get better regex support, I tried doing this with ack
, aaaand....nothing. What am I missing? Checked a bunch of examples and can see no difference in what I'm doing here.
$ hg log <filename> | ack changeset
$
There is no output.
Maybe I am misunderstanding this tool? egrep
did not have enough support either. I just want to use \s
:(
ack
do you have? You example works fine for me with version 2.14. – Stephen Kitt Apr 16 '15 at 22:45