-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Brett Parker <iDunno@sommitrealweird.co.uk> wrote:
Chris Glover <chris@glovercc.plus.com> wrote:
Hi,
Here's one for you...
If I have a range of files named dcp_1100.jpg - dcp_1189.jpg and I only want to copy 1156-1183, how do I do it.
cp dcp_11[56-83].jpg <dest> does not work, but cp dcp_115[6-9].jpg <dest> does.
OK, how about this...
cp dcp_11{5[6-9],[67][0-9],8[0-3]}.jpg dest
Yeah, it's not pretty, but it should work. The alternative is something like... (in bash):
for number in $(seq 1156 1183); do cp dcp_11$number.jpg dest ^^ this was a deliberate error, honest... obviously this *will not* work unless you strip that 11, either from the seq or here. done
Cheers, -- Brett Parker web: http://www.sommitrealweird.co.uk/ email: iDunno@sommitrealweird.co.uk
_______________________________________________ main@lists.alug.org.uk http://www.alug.org.uk/ http://lists.alug.org.uk/mailman/listinfo/main Unsubscribe? See message headers or the web site above!
- -- Brett Parker web: http://www.sommitrealweird.co.uk/ email: iDunno@sommitrealweird.co.uk -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCmjd4Eh8oWxevnjQRAjA4AJ92mZIyIiJwoFY6M5/F8RTXyRKhFwCfXfEZ H6bCwsbt62QDocm6km3ARSM= =Ay9l -----END PGP SIGNATURE-----