I'm trying to setup a linter for my code and I only want to lint the coffeescript files that have changed in the current branch. So, I generate the list of files using git:
git diff --name-only develop | grep coffee$
That gives me a nice list of the files I'd like to process but I can't remember how to pipe this to the linting program to actually do the work. Basically I'd like something similar to find's -exec:
find . -name \*.coffee -exec ./node_modules/.bin/coffeelint '{}' \;
Thanks!
git diff | grep. Do you mean passing the previous command's output as arguments, as withxargsor$(...)? – Anko Jul 22 '14 at 17:22