Skip to content

Instantly share code, notes, and snippets.

@djanowski
Created May 12, 2011 21:14
Show Gist options
  • Save djanowski/969458 to your computer and use it in GitHub Desktop.
Save djanowski/969458 to your computer and use it in GitHub Desktop.
#! /bin/bash
(($#)) || (echo "Usage: mack PATTERN PATTERN [PATTERN...]"; exit 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