Skip to content

Instantly share code, notes, and snippets.

@beatak
Created February 7, 2013 20:15
Show Gist options
  • Save beatak/4733806 to your computer and use it in GitHub Desktop.
Save beatak/4733806 to your computer and use it in GitHub Desktop.
To get a list of filenames by the result of ack. eg: ack 'foo.+bar' -u ./app | ack-filename.sh
#!/bin/sh
cut -d ':' -f1 < /dev/stdin | sort -u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment