I have a versioning command and we have to manually run it with all the changed files.
Is it possible to pass the changed and added files to another command as argument?
I have tried solutions mentioned in this link: is it possible to `git status` only modified files?, but its not working.
For sample I have made a dummy command:
function notify(){
echo "*****************************************************************"
echo $1
echo "*****************************************************************"
}
And I try to use it as:
git status -s | notify
git ls-files -m | notify
Is there a way to send individual file path to such command?
Edit 1:
As rightly pointed by mallaudin, I was missing xargs
. But adding that now throws another error.
xargs: notify: No such file or directory