Re: [dev] daemon for DWM

From: Martti Kühne <mysatyre_AT_gmail.com>
Date: Tue, 6 Aug 2013 15:52:22 +0200

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...

cheers!
mar77i
Received on Tue Aug 06 2013 - 15:52:22 CEST

This archive was generated by hypermail 2.3.0 : Tue Aug 06 2013 - 16:00:10 CEST