I'm trying to use parallel and ack together to do some searching in parallel. However, ack seems to insist on using stdin if it finds itself in a pipe, even if you give it files to search:
$ echo hello > test.txt
$ ack hello test.txt
hello
$ echo test.txt | xargs ack hello
hello
$ echo test.txt | parallel ack hello {}
# ack thinks it should be searching stdin:
$ echo test.txt | parallel ack -f {}
-
# even though parallel is indeed passing test.txt:
$ echo test.txt | parallel --dry-run ack hello {}
ack hello test.txt
What do I need to do to get ack and parallel to play nicely?