As part of post-commit hook, I try to copy all the files that changed into a local folder – using this script (attached only the relevant part of the script):
svnlook changed ${REPOS} -r ${REV} | sed "s/^....//" | xargs -I {} svnlook cat ${REPOS} {} -r ${REV} > /tmp/commit2/{}
which won’t replace the second {} with the xargs argument but use it as is (creating a file name ‘{}’).
Is it possible to replace the argument after the output redirect?
Thanks,
Roi
Not like that, no. The shell does the redirections, not
xargs.xargsisn’t even “aware” that a redirection is happening.You could use something like the following: