Re: [Exim] Re: Patch to allow stripping of binaries

Góra strony
Delete this message
Reply to this message
Autor: Vadim Vygonets
Data:  
Dla: exim-users
Temat: Re: [Exim] Re: Patch to allow stripping of binaries
Philip, welcome back.

Quoth Philip Hazel on Mon, Jun 11, 2001:
> On Mon, 11 Jun 2001, Sheldon Hearn wrote:
> > +    if [ x"$(STRIP_COMMAND)" != x"" ]; then \

>
> Nobody has ever been able to explain to me why they use that paradigm,
> instead of just
>
>         if [ "$(STRIP_COMMAND)" != "" ]; then \

>
> Do you know why you use it?


Not speaking for Sheldon ;)

Consider:
STRIP_COMMAND="-f"

In this case, your version is expanded as:
    if [ "-f" != "" ]; ...
(i.e., the conditional tests for existance of a plain file "!=").
Putting 'X' before the variable avoids this problem.


Arguably, the shell and test(1) languages should be more
ambiguous, maybe somewhat lisp-like, but this is outside the
scope of this posting.

Vadik.

-- 
Of course [nobody reads the docs that come with the OS] -- that
would be too easy and too quick.  People know that the Unix Way
is difficult and they prefer to keep it that way.
        -- Greg Black