Re: BASH scripting

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
+ (text/plain)
Delete this message
Reply to this message
Author: Bryan O'Neal
Date:  
To: Main PLUG discussion list
Subject: Re: BASH scripting
Because you are assigning the variable result of the executed expression.

On Mon, Mar 2, 2015 at 6:36 PM, Michael Havens <> wrote:

> just starting with this so please, bear with me....
>
> Anyways I am looking at this beginner's script:
>
>    #! /bin/bash
>    myvar=0
>    while [ $myvar -ne 20 ]
>    do
>            echo $myvar
>            myvar=$(( $myvar + 1 ))
>    done

>
> Now my mind can wrap itself around everything in this script except for
> tis line:
>
>    myvar=$(( $myvar + 1 ))

>
> Where my difficulty arises is why the '$' before the '(('?
> (it was geast fun running that script with a minus sign instead!)
> :-)~MIKE~(-:
>
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss