[NTLUG:Discuss] For loop in bash script

Eric Waguespack ewaguespack at gmail.com
Fri Apr 27 13:01:33 CDT 2007


no problem, by the way bash is kind of light when it comes to math
features, but you can always use bc, dc, or even better: just do it
all in perl :)

On 4/27/07, Neil Aggarwal <neil at jammconsulting.com> wrote:
> Eric:
>
> That worked perfectly.
>
> Thanks,
>         Neil
>
> --
> Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
> FREE! Eliminate junk email and reclaim your inbox.
> Visit http://www.spammilter.com for details.
>
> -----Original Message-----
> From: discuss-bounces at ntlug.org [mailto:discuss-bounces at ntlug.org] On Behalf
> Of Eric Waguespack
> Sent: Friday, April 27, 2007 12:17 PM
> To: NTLUG Discussion List
> Subject: Re: [NTLUG:Discuss] For loop in bash script
>
> >
> > I keep getting this error:
> > -bash: command substitution: line 1: syntax error near unexpected token
> > `2300+$i'
> > -bash: command substitution: line 1: `eval(2300+$i)'
> >
> > Is there a way to do this?
>
> # eval(2300+$i)
> -bash: syntax error near unexpected token `2300+$i'
> # echo $(( 2300 + $i ))
> 2301
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
>
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
>



More information about the Discuss mailing list