Skip to content

Instantly share code, notes, and snippets.

@sheenobu
Created October 23, 2012 17:28
Show Gist options
  • Save sheenobu/3940209 to your computer and use it in GitHub Desktop.
Save sheenobu/3940209 to your computer and use it in GitHub Desktop.
Detecting GNU find vs BSD find
FIND="find";find --version > /dev/null 2>&1 || FIND="gfind"
$FIND ...
or
ARGS="-iname ... -o -iname ..."; find --version > /dev/null 2>&1 && find $ARGS || gfind $ARGS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment