4

ackgrep用 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

来自 apt-get 软件包安装的 ack 版本 2 得到了相同的结果。在上面显示的单机版(版本 1)中。ack -f什么也没显示,我尝试了-rand*选项,结果都一样。

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

4

1 回答 1

8

如果我选择使用-aswitch 对所有文件进行操作,无论其类型如何(我的版本与您的版本相同),它都适用于我:

ack -a imbue *
于 2012-03-28T15:15:38.420 回答