Skip to content

Instantly share code, notes, and snippets.

@mpalet
Created December 17, 2018 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpalet/854c5faf70474f431ca6c7876784e4ab to your computer and use it in GitHub Desktop.
Save mpalet/854c5faf70474f431ca6c7876784e4ab to your computer and use it in GitHub Desktop.
compare files recursively
shopt -s globstar
for f in **/*.ptx; do for i in **/*.ptx; do if ! [[ $f -ef $i ]]; then cmp -s "$f" "$i" && echo "Files $f and $i are identical"; fi; done; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment