Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Aug 2001 15:50:59 -0700
From:      Drew Tomlinson <drewt@writeme.com>
To:        'Linh Pham' <lplist@closedsrc.org>
Cc:        "FreeBSD Questions (E-mail)" <freebsd-questions@FreeBSD.org>
Subject:   RE: Shell Script Help - Comparing Strings
Message-ID:  <5CD46247635BD511B6B100A0CC3F023925A06A@ldcmsx01.lc.ca.gov>
In-Reply-To: <Pine.BSF.4.33.0108141546520.29182-100000@q.closedsrc.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> -----Original Message-----
> From: Linh Pham [mailto:lplist@closedsrc.org]
> Sent: Tuesday, August 14, 2001 3:48 PM
> To: Drew Tomlinson
> Cc: FreeBSD Questions (E-mail)
> Subject: Re: Shell Script Help - Comparing Strings
> 
> 
> On 2001-08-14, Drew Tomlinson scribbled:
> 
> # #! /bin/sh -vx
> #
> # #  8/8/01
> # #  An attempt to write script to run webalizer to generate 
> web stats for all
> # #  virtual web sites.
> #
> # #  Set command line variables.  $1 = web to run.
> #
> # #  Set $1 to "www" if blank.
> # echo $1
> # if ["$1"=""]
> #   then $1 = "www"
> # fi
> 
> Have you tried:
> 
> if ["$1"==""]
> 
> instead of just having =

No I hadn't but it doesn't seem to help:

if ["$1"==""]
  then $1 == "www"
fi
+ [test==]
[test==]: not found

What's the difference between "=" and "=="?

Thanks,

Drew 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5CD46247635BD511B6B100A0CC3F023925A06A>