Sample Header Ad - 728x90

Why can't I pipe to ack?

2 votes
5 answers
1230 views
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 | 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 | 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 :(
Asked by temporary_user_name (595 rep)
Apr 16, 2015, 10:25 PM
Last activity: Nov 21, 2020, 08:34 AM