Am 2013-08-06 15:52, schrieb Martti Kühne:
> mar77i_AT_asus77i:~$ 0+445
> -bash: 0+445: command not found
> mar77i_AT_asus77i:~$ a=(0+445)
> mar77i_AT_asus77i:~$ echo $a
> 0+445
>
> holy crap, that's what happens. Weren't you looking for this instead:
>
> mar77i_AT_asus77i:~$ a=$(( 5554 - 1000 ))
> mar77i_AT_asus77i:~$ echo $a
> 4554
>
> so, you're misusing bash's array syntax to concatenate a string with
> the output from a useless cat.
> Hmm, after writing this you could be using IFS=+, but then again,
> you'd have nonsensical "subtractions" on the last two lines you
> posted, unless... No, I just don't believe you set IFS=+-.
> The most interesting thing I find that you keep prepending 'let' to
> your assignments, presumaby FOR the BASIC look of it. NEXT. Enough of
> this, pretty much because I know bash pretty well, I'd say it's
> probably futile to try to review something as naturally ugly and
> confusing as bash, but this indeed was pretty far off...
As i said, it is just a bunch of stackoverflow answers patched together
by try-and-error.
Thanks for pointing out, HOW ugly it is. I probably will start the C
version very soon. ;)
--Markus
Received on Tue Aug 06 2013 - 21:52:56 CEST
This archive was generated by hypermail 2.3.0
: Tue Aug 06 2013 - 22:00:10 CEST