[wellylug] linux challenge: bash/cgi

Jamie Baddeley wellylug at vpc.co.nz
Tue May 16 20:00:10 NZST 2006


Hi Luggites,

I'd like to combine the output of this:

viewpoint at munter:~$ whois -h whois.apnic.net -r thursday|grep tech-c|wc
-l
13

$output = `whois -h whois.apnic.net -r thursday|grep tech-c|wc -l`

With a random number generator that has a randomisation range between .1
and .9, so, $output * $random = $lucky_number

Would need to be whole numbers, so rounding up would be best.

And, ideally the $lucky_number would have a tendency toward 3.

What would I combine with the command above to do that in bash?

And for bonus points, rewriting the above so it's a secure cgi.

cheers

jamie







More information about the wellylug mailing list