[clug] Shell glob for a range of numbers?

McClure, Mike MikeMcClure at ap.spherion.com
Fri Jan 9 02:59:10 GMT 2004


> From: Michael Still [mailto:mikal at stillhq.com]

um, bogo search algorithm huh?
   if [ $averybadnameforavariable -lt 4 ]
should read
   if [ $averybadnameforavariable -gt 4 ]
:)

> target=$(( 21 - 5 ))
> while [ $target != 0 ]
> do
>   averybadnameforavariable=$RANDOM
>   if [ $averybadnameforavariable -lt 22 ]
>   then
>     if [ $averybadnameforavariable -lt 4 ]
>     then
>       if [ -f argus.log.$averybadnameforavariable.gz ]
>       then
>         cp argus.log.$averybadnameforavariable.gz /tmp
>         target=$(( $target - 1 ))
>       fi
>     fi
>   fi
> done

mike(y)

The information contained in this email and any attachments to it:

(a) may be confidential and if you are not the intended recipient, any interference with, 
use, disclosure or copying of this material is unauthorised and prohibited; and

(b) may contain personal information of the recipient and/or the sender as defined 
under the Privacy Act 1988 (Cth). Consent is hereby given by the recipient(s) to 
collect, hold and use such information and any personal information contained in a 
response to this email, for any reasonable purpose in the ordinary course of 
Spherion's 
business, including forwarding this email internally or disclosing it to a third party. All 
personal information collected by Spherion will be handled in accordance with 
Spherion's Privacy Policy. If you have received this email in error, please notify the 
sender and delete it.

(c) you agree not to employ or arrange employment for any candidate(s) supplied in 
this email and any attachments without first entering into a contractual agreement with 
Spherion. You further agree not to divulge any information contained in this document 
to any person(s) or entities without the express permission of Spherion.




More information about the linux mailing list