ack没有做递归grep

And*_*510 4 grep ack

ack(grep用Perl编写的工具)找不到找到的文件,grep -r我找不到合适的选项让它工作.以下显示ack未找到目标字符串,该字符串位于子目录中的常规文件中.它在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
Run Code Online (Sandbox Code Playgroud)

来自apt-get软件包安装的ack版本2获得了相同的结果.在上面显示的独立版本(版本1)中.ack -f没有显示,我尝试了-r*选项,都有相同的结果.

在另一台机器上,Ubuntu 10.04,它就像一个魅力.

Bir*_*rei 8

如果我选择在所有文件中操作而不管其类型,使用-a开关(我的版本与您的相同),它对我有用:

ack -a imbue *
Run Code Online (Sandbox Code Playgroud)