xargs command works on ubuntu, but not mac
- by Corey hart
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" @