Linux GNU xargs
I have the file doit with
arg1 arg2 arg3 arg4
arg1 arg2 arg3 arg4
I want to perform
command arg1 arg2 arg3 arg4
command arg2 arg2 arg3 arg4
What I can't figure out is how to do this with xargs
If one does xargs -a doit -I % command %
It runs
command 'arg1 arg2 arg3 arg4'
i.e run command with the first argument = 'arg1 arg2 ....'
xargs
is meant to gather an unknown amount of arguments fromSTDIN
or a file, and run a command an unknown amount of times. You know exactly how many arguments you have and how many times to run your command.