bug-findutils
[Top][All Lists]
Advanced

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

Feature request: generalize xargs with --delimiter=tag


From: Ville Herva
Subject: Feature request: generalize xargs with --delimiter=tag
Date: Mon, 31 Dec 2001 16:33:55 +0200
User-agent: Mutt/1.2.5i

xargs could be used with not just files if it would accept and arbitrary
delimiter for fields.

Imagine doing

> xargs --delim=DELIMITER --replace "echo {} | mail address@hidden" < reports

instead of

> cat reports | perl -pe 's/DELIMITER/\000/g' | \
   xargs -0 --replace "echo {} | mail address@hidden"

Actually, there's an additional problem. The "echo {} | prog" syntax does
not work with the current xargs - it gives 

xargs: "echo {} | mail address@hidden" not found.

Notice that it doesn't seem to replace {} besides of not passing the
"..." string to shell as would be needed.

You even could think of something like

> xargs --stdin --delim=DELIMITER --replace mail address@hidden < reports

where --stdin would pass the input to stdin instead of as an argument.


I might cook up a patch, if you think you'll consider including it.


 
-- v --

address@hidden



reply via email to

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