Create a gist now

Instantly share code, notes, and snippets.

A option for shut xargs trailed command up when no data from stdin on Linux
#! /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