Date: Wed, 29 Mar 2006 20:43:43 +0200 From: usleepless@gmail.com To: freebsd-questions@freebsd.org Subject: Re: Shell ( csh, sh ) scripting and seq-command Message-ID: <c39ec84c0603291043u3557ffa9rb4331ba8d3009cd6@mail.gmail.com> In-Reply-To: <c39ec84c0603290953n2819ef36j30d523537a093827@mail.gmail.com> References: <c39ec84c0603290953n2819ef36j30d523537a093827@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
never mind!
#!/bin/csh
if ($#argv =3D=3D 2) then
@ start =3D $argv[1]
@ end =3D $argv[2]
@ i =3D $argv[1]
while ( $i <=3D $end )
echo $i
@ i =3D $i + 1
end
endif
if ($#argv =3D=3D 3) then
@ start =3D $argv[1]
@ end =3D $argv[3]
@ step =3D $argv[2]
@ i =3D $argv[1]
while ( ($step>0 && $i <=3D $end) || ($step<0 && $i >=3D $end) )
echo $i
@ i =3D $i + $step
end
endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c39ec84c0603291043u3557ffa9rb4331ba8d3009cd6>
