xargs --replace or -I options
Where is a wrong?
Code:
xargs -I{} foo {} bar/$(basename {}) Code:
$(basename /full/path) Thanks! |
"$()" is not a system command, but a shell syntax pattern that runs the command in a subshell. xargs is not a shell, so it cannot execute it. It should be possible by having it execute "bash" or another shell, with the code as the argument to that.
BTW, it may help if you provided more details about what you are trying to do, such as what the input to this command should be, and/or what you want to get out of it. |
I tried to form arguments of the command convert from imagemagick package in this way
Code:
find somedir ... | xargs -I{} convert {} -resize 50% destdir/$(basename {}) Solution looks like Code:
list=$(find ...) |
All times are GMT -5. The time now is 03:04 AM. |