bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xargs - how to get it to execute input args as "the command"?


From: Linda A. Walsh
Subject: Re: xargs - how to get it to execute input args as "the command"?
Date: Sun, 05 Jan 2014 03:09:42 -0800
User-agent: Thunderbird



James Youngman wrote:
You can use the "sh -c" trick to run the first argument as the command.
----
Do you think the above case could be optimized?  As I mentioned in my inital
query, I wanted to avoid shell overhead on 80 thousand sub-jobs.

I.e. is there any reason xargs couldn't run the arguments directly -- i.e.
taking the first word of input as a program to run and either do a path
lookup, OR require an absolute path (either would be fine)


You can use -d to select the delimiter.
----
That will work.. didn't see it would override the normal quote
processing...  Thanks!

I looked at 'parallel' and 'sem' as well, and they want a command on
the command line as well... geez...  you'd think something would
take a list of command in a file and run them in parallel (subject
to load constraints) w/o having to run a shell w/each command.

Hard to believe such a simple thing wouldn't be an option...but

is there any  reason why putting a "-I {}" by itself on the command
line shouldn't work?

(tried "exec", but I guess that is a shell builtin...sigh)...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]