bug-findutils
[Top][All Lists]
Advanced

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

Re: xargs prompts with the same string, but executes differently


From: 積丹尼 Dan Jacobson
Subject: Re: xargs prompts with the same string, but executes differently
Date: Wed, 24 Jul 2019 03:04:33 +0800

Plus I'm not sure that

     '-I REPLACE-STR'
     '--replace[=REPLACE-STR]'
     '-i[REPLACE-STR]'
          Replace occurrences of REPLACE-STR in the initial arguments with
          names read from standard input.  Also, unquoted blanks do not
          terminate arguments; instead, the input is split at newlines only.
          If REPLACE-STR is omitted (omitting it is allowed only for '-i'),
          it defaults to '{}' (like for 'find -exec').  Implies '-x' and '-l
          1'.  The '-i' option is deprecated in favour of the '-I' option.

is enough to make it clear that

$ echo a b c|xargs -I{} echo x {} y {} z {}
will make
x a b c y a b c z a b c
and not
x a b y z c

Nor does it mention that one is actually doing
echo x 'a b c' y 'a b c' z 'a b c'
and not just
echo x a b c y a b c z a b c



reply via email to

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