Created
November 7, 2011 07:13
-
-
Save wtnabe/1344386 to your computer and use it in GitHub Desktop.
A option for shut xargs trailed command up when no data from stdin on Linux
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
#! /bin/sh | |
XARGS_NO_RUN='' | |
if [ `uname` = 'Linux' ]; then XARGS_NO_RUN='--no-run-if-empty'; fi | |
find PATH CONDITIONS | xargs $XARGS_NO_RUN COMMAND |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment