ash: command line editing question

Sean Parker supinlick at yahoo.com
Wed Dec 5 15:24:48 UTC 2007


Hello - 
  I think you can say "let var2=$(( $VAR + $VAR )); echo
$var2" - spaces between '$((' and '$VAR' req'd

  Hope this helps/works/is best
    Sean



--- Alexander Griesser <alexander.griesser at lkh-vil.or.at>
wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi folks!
> 
> I don't really know what's the correct english word for
> it, so let me
> please rephrase it :)
> 
> When I do the following on bash, I can either quit with
> CTRL-C or
> complete the command by adding the last parantheses:
> 
> - ---------------------- 8< ---------------------
> vi-edv003:~# VAR=2
> vi-edv003:~# echo $(( $VAR + $VAR )
> > )
> - -su: 2: command not found
> 
> vi-edv003:~#
> - ---------------------- 8< ----------------------
> 
> The calculation doesn't work (don't know why, but that
> isn't the
> problem now) but after entering the missing parantheses
> on the
> second line, the command gets executed and drops me back
> to the
> shell.
> 
> Using busybox' ash, I experience the following problem:
> 
> - ---------------------- 8< ---------------------
> [lxtcv18beta - ~ #] VAR=2
> [lxtcv18beta - ~ #] echo $(( $VAR + $VAR )
> > )
> > )
> > )
> > )
> [...]
> - ---------------------- 8< ---------------------
> 
> As you might guess, I'm unable to stop this now. Neither
> Ctrl-C, nor
> Ctrl-Z or anything else works besides killing the shell.
> 
> Can anyone reproduce this?
> 
> P.S.: Why does the calculation above not work (even in
> bash)?
>       As far as I understood it, it should be the same
> as:
> 
> 
>       # VAR=2
>       # echo $(( $VAR + $VAR ))
> 
>       No matter if there's a line break betweeen or not,
> right?
> 
> ciao,
> - --
> Alexander Griesser (Netzwerkadministration)
> E-Mail: alexander.griesser at lkh-vil.or.at | Web:
> http://www.lkh-vil.or.at
> KABEG LKH Villach | Nikolaigasse 43 | 9500 Villach
> Tel.:   +43 4242 208 3061 | Fax.:   +43 4242 971 3061
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla -
> http://enigmail.mozdev.org
> 
>
iD8DBQFHVsAw66HVD6KUm1oRAouaAJ9SmMTeSerHEmGWVoT6oI8bdJiWSACgjHZ7
> mr/SRuhLnuA2OS73WL2CjSk=
> =c77h
> -----END PGP SIGNATURE-----
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/cgi-bin/mailman/listinfo/busybox
> 





God Bless 
    Sean Parker 





      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs



More information about the busybox mailing list