I would like to include files with a specific name -- not an extension -- in my ack
search. Is this possible with ack?
If I use the -G
option, this would exclude all other file types. (So I can't put it in my .ackrc
file.)
I tried to use --type-set mytype=filename.txt
but this only works for extensions, so this would search for files including the pattern .filename.txt
, thus not find filename.txt
. (That's also what the ack --help types
shows: --mytype .filename.txt
, not --mytype filename.txt
.)
Someone any ideas?
find . -name filename.txt | xargs ack PATTERN -
– Offside