Quote:
Originally Posted by jmseight
Hi,
I tried
ST="$ST$L"
and whenever I hit the space things seems to get messed up so I cna no longer type anything else except Aa to terminate the script.
The echo command
ST="$(echo \"$ST$L\")"
also does the same thing, except a lot of " signs are added to the string.
Thanks,
JAmes
|
Like I said, I did not test it. It was just something that *should* work. The problem is, many things that *should* work in these versions of busybox do not work as expected, requiring more tinkering than you would expect.
However, I just tried this on my K3:
# ST="abcdefg"
# L=" "
# ST="$ST$L"
# echo "($ST)"
(abcdefg )
#
Notice that the space was appended to ST as expected, so your problem must be in other code. Still, the quotes are needed to prevent chopping the trailing space off the string, like I said...
After looking at your code again, I see another problem:
eips $XP $YP $ST"_ "
really should be:
eips $XP $YP "$ST_ "
Otherwise, a space in ST will expand the 3rd parameter into a 3rd and 4th parameter that will make eips unhappy, giving an error message to STDERR. In linux, parameters that may contain spaces MUST be enclosed in quotes. It's the law! Fear it! (Only leave out quotes when you know you can get away with it, like I do.)