xargs command works on ubuntu, but not mac

Posted by Corey hart on Super User See other posts from Super User or by Corey hart
Published on 2010-04-17T21:12:23Z Indexed on 2010/04/18 12:23 UTC
Read the original article Hit count: 348

Filed under:
|
|
|

I have the following line of code that I use to update my personal date variable in my projects to today's current date. This line works in Ubuntu's terminal, but the Mac terminal seems to be far behind. Unfortunately, I copied this snippet from some site, so I'm not sure how it exactly works. Suggestions?

grep -ilr --exclude=revar.sh --exclude=README.md "[DATE]" * |
    grep -v .git | xargs -i@ sed -i "s/\[DATE\]/${today}/g" @

© Super User or respective owner

Related posts about bash

Related posts about shell