[clug] Shell glob for a range of numbers?

Martin Pool mbp at sourcefrog.net
Thu Jan 8 04:35:27 GMT 2004


On  8 Jan 2004 Kim Holburn <kim.holburn at anu.edu.au> wrote:

> At 10:16 AM +1000 2004/01/08, Andrew Pollock wrote:
> >Hi,
> >
> >It's always bugged me that I can't glob a range of numbers (that I know of).
> >
> >I've got a bunch of files, named say argus.log.5.gz -> argus.log.21.gz
> >
> >I wish there was a ".." operator/regex thingy.

for i in `seq 5 21`; do cp argus.log.$i.gz /tmp; done

-- 
Martin 
                               linux.conf.au -- Adelaide, January 2004
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/linux/attachments/20040108/1408a06c/attachment.bin


More information about the linux mailing list