Closed stephane-archer closed 7 years ago
Hard to tell with limited information. Tell me more.
What is in the directory you are in? What exactly do you mean by "nothing happens"?
I'm in my home directory, after typing the command the output i get is: Name of a file\n and it's wait for something indefinitely (It don't show me the match)
Can you please paste exact screenshots or text cut & paste?
Also, how did you install ack?
And has it ever worked for you? Is this the first time you're using ack?
I use ack regulary (it's been one month i replace it from grep) I install it with apt on ubuntu :)
if I type ack " $" it work perfectly or any other regexp, this this one don't work
Are you wanting to find a literal dollar sign? $
is the metacharacter for the end of a line. What if you do ack "\$"
or ack -Q "$"
?
Could your shell be doing some weird interpretation of that? What if you have ack '$'
to avoid any shell interpolation? What if you do echo "$"
vs. echo '$'
? What shell are you using?
Are you calling ack directly? Are you wrapping it in a shell script at all? What does which ack
and whereis ack
show?
I think either your shell is doing something goofy or there's something weird with $
being the metacharacter for end of a line.
ack '$' give the same result, I use zsh, which ack give: /usr/bin/ack whereis ack give: ack: /usr/bin/ack /usr/share/man/man1/ack.1p.gz
Somehow I think that your shell is messing with things. What about the other things I asked? What does echo "$"
show?
Can you switch to bash and see what happens?
ack "\$" don't work ack -Q "$" search the char $ but not the meta char :)
echo "$" show: $
bash has the same behavior :)
This is a bug that's been fixed since 2.14. You need a newer version. It works fine in 2.16 and 2.18.
The big question is: Why are you acking for $
, which is the end of the line? Every line is going to match.
I just wanted to report to you a bug to help. I glad it's fix :) Ubuntu is always terribly late....
But still I wonder: Why are you trying to match against $
?
I was matching with " $" to find some useless space on my files and I discover the bug but forgetting to put " " :)
if i type ack "$" nothing happen why?? ack 2.14 Running under Perl 5.22.1 at /usr/bin/perl