ash: command line editing question
Alexander Griesser
alexander.griesser at lkh-vil.or.at
Wed Dec 5 07:13:52 PST 2007
-----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-----
More information about the busybox
mailing list