Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15251 > unrolled thread
| Started by | Martin Schulte <gnu@schrader-schulte.de> |
|---|---|
| First post | 2019-07-29 07:01 +0200 |
| Last post | 2019-07-29 07:01 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.bash.bug
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: T/F var expansion? Martin Schulte <gnu@schrader-schulte.de> - 2019-07-29 07:01 +0200
| From | Martin Schulte <gnu@schrader-schulte.de> |
|---|---|
| Date | 2019-07-29 07:01 +0200 |
| Subject | Re: T/F var expansion? |
| Message-ID | <mailman.96.1564376479.1985.bug-bash@gnu.org> |
Hello!
> Is there a T/F var expansion that does:
>
> var=${tst:+$yes}${tst:-$no}
>
> but with yes/no in 1 expansion?
At least if you are only working with numbers you can use
((var=(tst!=0?42:31)))
But is this a question for bug-bash?
Best regards,
Martin
Back to top | Article view | gnu.bash.bug
csiph-web