Skip to content

Instantly share code, notes, and snippets.

@ibr
Forked from djanowski/mack
Created May 13, 2011 07:13
Show Gist options
  • Save ibr/970121 to your computer and use it in GitHub Desktop.
Save ibr/970121 to your computer and use it in GitHub Desktop.
mack() {
(($#)) || (echo "Usage: mack PATTERN PATTERN [PATTERN...]" && return 1)
if (($# == 1)); then
ack -l "$1"
else
grep -Ffx <(ack -l "$1") <(shift; mack "$@")
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment