xargs command works on ubuntu, but not mac

Posted by Corey Hart on Stack Overflow See other posts from Stack Overflow or by Corey Hart
Published on 2010-04-17T21:12:23Z Indexed on 2010/04/17 21:23 UTC
Read the original article Hit count: 202

Filed under:
|
|
|

I have the following line of code that I use to update my personal date variable in my projects to todays 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" @

© Stack Overflow or respective owner

Related posts about bash

Related posts about shell