4

ackgrepPerlで書かれたツール)は、を見つけるファイルをgrep -r見つけられず、それを機能させるための適切なオプションを見つけることができません。次のショーackでは、サブディレクトリの通常のファイルにあるターゲット文字列が見つかりませんでした。Bashシェル(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パッケージのインストールによるバージョン2のackでも、同じ結果が得られました。上記のスタンドアロンバージョン(バージョン1)。何も表示されません。とオプションack -fを試しましたが、すべて同じ結果になりました。-r*

別のマシン、Ubuntu 10.04では、それは魅力のように機能します。

4

1 に答える 1

8

スイッチを使用して、タイプに関係なくすべてのファイルで操作することを選択した場合、それは私のために機能します-a(私のバージョンはあなたのものと同じです):

ack -a imbue *
于 2012-03-28T15:15:38.420 に答える