[clug] Shell glob for a range of numbers?

Damien Elmes clug at repose.cx
Thu Jan 8 06:57:45 GMT 2004


David Gibson <david at gibson.dropbear.id.au> writes:

> On Thu, Jan 08, 2004 at 05:42:50PM +1100, Damien Elmes wrote:
>> David Gibson <david at gibson.dropbear.id.au> writes:
>> 
>> > Or, to avoid the loop in an excessively silly way:
>> >
>> > eval cp argus.log.\{`seq -s, 5 21`\} /tmp
>> 
>> I'll raise you 5.
>> 
>> seq 5 21 | xargs cp --target-directory=/tmp
>
> But that doesn't actually do the right thing.  You'd need:
>
> seq 5 21 | sed 's/^/argus.log./' | xargs cp --target-directory=/tmp

Which is arguably more silly ;-) But you're right, I wasn't paying
attention.

Cheers,
-- 
Damien Elmes


More information about the linux mailing list