ack
(the grep
tool written in Perl) does not find a file that grep -r
finds, and I cannot find the right options to get it to work. The following shows ack
did not find the target string, which is in a regular file in a sub-directory. It's on Bash shell (Ubuntu 11.04):
100 $ grep -r imbue *
hel/find: the fact that some shells including Bash imbue braces
## Note: grep find it as shown in the above.
101 $ ./ack-standalone imbue
## Note: ack didn't find it as shown in the above.
102 $ ./ack-standalone --version
ack 1.96
Running under Perl 5.10.1 at /usr/bin/perl
Copyright 2005-2011 Andy Lester.
This program is free software. You may modify or distribute it
under the terms of the Artistic License v2.0.
## This is the testing folder structure:
103 $ tree
.
ack-standalone
hel
|- dot
|- find
|- grep
|- jobs
perlman
perlre
perlrequick
perlrun
perlvar
xargs
1 directory, 11 files
Version 2 of ack, from apt-get package installation, got same results. In the stand-alone version (version 1) shown above. ack -f
shows nothing, and I tried the -r
and *
options, all with the same results.
On another machine, Ubuntu 10.04, it works like a charm.
ack -a imbue *
example there, the*
should not be included. You never want to specify a filename to ack unless you have a reason to specify a filename to ack. – Unclassified