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

On Sun, 19 Jul 2020 13:12:19 +0200
"R.Wieser"  wrote:

> I would suggest you listen do dumbass sorry, Dumas there, even though
> Ahem and Andy said the same as I did and did not post a solution either.

 I posted a solution - the correct one viz:

>  I'd suggest quoting ${GOV} and ${FORCE} in that statement one or
> other may be empty which without quotes will break the syntax of the test
> command arguments.

 OK I didn't explicitly write out the corrected version. Like Andy I
prefer to help people think and understand.

> As for the solution ?   I overthought it.    The problem is that the

 Twice and still got it wrong!

> FORCE variable may be an empty string.  The solution ?  Make sure that

 It might also contain spaces, tabs, newlines etc.

> the compared-with string is never empty.  How ?   Prefix a character -
> and do the same to the other side of the comparision.

 BAD SOLUTION! I've been seeing this bad solution used since the mid
1980s, it was a bad idea then and it still is today.

> In short, something like this:
>
> change
>
> ${FORCE} = "1"
>
> to
>
> "!"${FORCE} = "!1"

 Try FORCE="Silly boy this doesn't work" in your version. Quoting
the variable expansion is the correct solution viz:

 "${FORCE}" = "1"

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