TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: R.WIESER
from: AHEM A RIVET`S SHOT
date: 2020-07-20 13:44:00
subject: Re: Strange construct in

On Mon, 20 Jul 2020 11:52:48 +0200
"R.Wieser"  wrote:

> > It might also contain spaces, tabs, newlines etc.
>
> Yeah, that was something I didn't think about ...

 The root cause of 99.9% of all software problems right there.

> And yes, wrapping the environment variable into double quotes does seem
> to do the trick.

 It is also standard best practice for shell programming and has
been for decades.

>   Even though my tests in that direction initially
> failed - because I removed the spaces at both sides of the "=".   Didn't
> realise BASH needs them.

 It's nothing to do with bash, and everything to do with /bin/test
aka /bin/[.

--
Steve O'Hara-Smith                          |   Directable Mirror Arrays
C:\>WIN                                     | A better way to focus the sun
The computer obeys and wins.                |    licences available see
You lose and Bill collects.                 |    http://www.sohara.org/

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.