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