[Gllug] Re: Bash Data validation libraries

ccooke ccooke-gllug at gkhs.net
Tue Feb 14 20:48:03 UTC 2006


On Tue, Feb 14, 2006 at 08:40:22PM +0000, ccooke wrote:

<snip>

Bah. following up to myself :-/

>         local ip="$1"
>         local octets=0
>         local octet

I should have said, if you're using ksh93, the above lines should be:

	  typeset ip="$1"
	  integer octets=0
	  integer octet

ksh93 is a nice shell to do scripting in. I'm not sure if this is a good
thing, since it's sometimes tempting to write things in ksh93 when perl
would be a better language... :-)

-- 
((Y=2.1/`tput lines`,X=3.2/(`tput cols`-1)));float a b c x y=-1.05;print;while\
((y<1.05));do x=-2.2;while((x<1));do a=b=i=k=0;until(((c=a)*a+b*b>2))||((i++>9\
9));do((a=a*a-b*b+x,b=2*c*b+y));done;((j=(i<99?i%16:0)+30,x+=X));((j>37))&&((k\
=1,j-=8));print "\E[$k;${j}mE\c";done;((y+=Y));print "\E[0m";done #ccooke
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list