Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

petdance (2468)

AOL IM: petdance (Add Buddy, Send Message)
Yahoo! ID: petdance (Add User, Send Message)

I'm Andy Lester, and I like to test stuff. I also write for the Perl Journal, and do tech edits on books. Sometimes I write code, too.

Journal of petdance (2468)

Thursday August 24, 2006
08:54 PM

ack 1.26 is out

[ #30745 ]
I added lots of new file types to ack:

Usage: ack [OPTION]... PATTERN [FILES]
Search for PATTERN in each source file in the tree from cwd on down.
If [FILES] is specified, then only those files/directories are checked.
ack may also search STDIN, but only if no FILES are specified, or if
one of FILES is "-".

Default switches may be specified in ACK_SWITCHES environment variable.

Example: ack -i select

    -i              ignore case distinctions
    -v              invert match: select non-matching lines
    -w              force PATTERN to match only whole words

Search output:
    -l              only print filenames containing matches
    -o              show only the part of a line matching PATTERN
                    (turns off text highlighting)
    --output=expr   output the evaluation of expr for each line
                    (turns off text highlighting)
    -m=NUM          stop after NUM matches
    -H              print the filename for each match
    -h              suppress the prefixing filename on output
    -c, --count     show number of lines matching per file

    --group         group matches by file name.
                    (default: on when used interactively)
    --nogroup       One result per line, including filename, like grep
                    (default: on when the output is redirected)

    --[no]color     highlight the matching text (default: on unless
                    output is redirected, or on Windows)

File finding:
    -f              only print the files found, without searching.
                    The PATTERN must not be specified.

File inclusion/exclusion:
    -n              No descending into subdirectories
    -a, --all       All files, regardless of extension (but still skips
                    blib, CVS, RCS, SCCS, .svn and _darcs dirs)
    --[no]asm       .s and .S
    --[no]binary    Binary files, as defined by Perl's -B op (default: off)
    --[no]cc        .c and .h
    --[no]css       .css
    --[no]elisp     .el
    --[no]haskell   .hs and .lhs
    --[no]html      .htm, .html and .shtml
    --[no]js        .js
    --[no]lisp      .lisp
    --[no]ocaml     .ml and .mli
    --[no]parrot    .pir, .pasm, .pmc, .ops, .pod, .pg and .tg
    --[no]perl      .pl, .pm, .pod, .tt, .ttml and .t
    --[no]php       .php, .phpt, .htm and .html
    --[no]python    .py
    --[no]ruby      .rb, .rhtml and .rjs
    --[no]scheme    .scm
    --[no]shell     .sh, .bash, .csh, .ksh and .zsh
    --[no]sql       .sql and .ctl
    --[no]tt        .tt and .tt2
    --[no]vim       .vim
    --[no]yaml      .yaml and .yml

    --help          this help
    --version       display version
    --thpppt        Bill the Cat

Note that FILES must still match valid selection rules.  For example,

    ack something --perl foo.rb

will search nothing, because foo.rb is a Ruby file.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.