3 ms·
One thing that have bitten me in the past is the fact that xargs always runs at least once, even if there are no input. By using the -r / --no-run-if-empty flag
by uggedal 15y ago
One thing that have bitten me in the past is the fact that xargs always runs at least once, even if there are no input. By using the -r / --no-run-if-empty flag, xargs does not run the command if the input does not contain any nonblanks.
- ptramo 15y agoAs with many cool features, it's a GNU-only option. One can refer to http://pubs.opengroup.org/onlinepubs/009695399/utilities/xargs.html http://pubs.opengroup.org/onlinepubs/009695399/utilities/xar... for the portable flags.