From owner-freebsd-questions Tue Aug 14 15:56:17 2001 Delivered-To: freebsd-questions@freebsd.org Received: from lcmail2.lc.ca.gov (lcmail2.lc.ca.gov [165.107.12.11]) by hub.freebsd.org (Postfix) with ESMTP id B50C037B405 for ; Tue, 14 Aug 2001 15:56:12 -0700 (PDT) (envelope-from drewt@writeme.com) Received: from CONVERSION-DAEMON by lcmail2.lc.ca.gov (PMDF V5.2-27 #40821) id <0GI200901Y9QQZ@lcmail2.lc.ca.gov> for freebsd-questions@FreeBSD.org; Tue, 14 Aug 2001 15:55:27 -0700 (PDT) Received: from tagalong ([165.107.42.215]) by lcmail2.lc.ca.gov (PMDF V5.2-27 #40821) with SMTP id <0GI2009LAY7GAA@lcmail2.lc.ca.gov> for freebsd-questions@FreeBSD.org; Tue, 14 Aug 2001 15:52:35 -0700 (PDT) Date: Tue, 14 Aug 2001 15:50:59 -0700 From: Drew Tomlinson Subject: RE: Shell Script Help - Comparing Strings In-reply-to: To: 'Linh Pham' Cc: "FreeBSD Questions (E-mail)" Message-id: <5CD46247635BD511B6B100A0CC3F023925A06A@ldcmsx01.lc.ca.gov> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > -----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