[clug] Shell glob for a range of numbers?
David Gibson
david at gibson.dropbear.id.au
Thu Jan 8 06:46:54 GMT 2004
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
--
David Gibson | For every complex problem there is a
david at gibson.dropbear.id.au | solution which is simple, neat and
| wrong.
http://www.ozlabs.org/people/dgibson
More information about the linux
mailing list