Created
October 23, 2012 17:28
-
-
Save sheenobu/3940209 to your computer and use it in GitHub Desktop.
Detecting GNU find vs BSD find
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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