Skip to content

Instantly share code, notes, and snippets.

@jamiebullock
Created July 4, 2013 16:01
Show Gist options
  • Save jamiebullock/5928818 to your computer and use it in GitHub Desktop.
Save jamiebullock/5928818 to your computer and use it in GitHub Desktop.
List files from one directory that are referenced by files in another directory (recursive)
for file in *;do grep -r -o $file __directory__;done | tr -s ':' | cut -d ':' -f2 | uniq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment