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

Re: Copy a file one hundred times



Tzafrir Cohen wrote:
> On Sun, Dec 21, 2008 at 04:45:21PM -0600, Ron Johnson wrote:
>> On 12/21/08 15:58, Jörg-Volker Peetz wrote:
>>> $ seq -w 1 1 10 | xargs -i -n1 cp file.jpg file{}.jpg
>> What's with the {}?  An implied variable?
> 
> $ LANG=C man xargs | grep -C 2 '{}'
>        -i[replace-str]
>               This  option  is  a  synonym for -Ireplace-str if replace-str is
>               specified, and for -I{} otherwise.  This option  is  deprecated;
>               use -I instead.
> 

yes, {} was the default placeholder in the xargs command. According to the
man-page it should now be

$ seq -w 1 1 100 | xargs -I{} cp file.jpg file{}.jpg

-- 
Regards,
Jörg-Volker.


Reply to: