Search This Blog

xargs with multiple commands

  • Example 1:
    find "/Users/wilson/Documents" -type f -print0 | xargs -0 -i bash -c 'grep -L "{}" /tmp/document-list.csv || echo "{}"'
  • Example 2:
    cat a.txt | xargs -I % sh -c 'echo %; ls %'






see also

No comments:

Post a Comment