From owner-freebsd-questions@FreeBSD.ORG Tue Jun 1 02:58:46 2010 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F54D1065674 for ; Tue, 1 Jun 2010 02:58:46 +0000 (UTC) (envelope-from aiza21@comclark.com) Received: from avmxsmtp1.comclark.com (avmxsmtp1.comclark.com [202.69.191.115]) by mx1.freebsd.org (Postfix) with ESMTP id F1B598FC0A for ; Tue, 1 Jun 2010 02:58:45 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApQYANsTBEzKRa1aPGdsb2JhbAAHh2KWTwEBAQE1vn+FFgSDRg X-IronPort-AV: E=Sophos;i="4.53,337,1272816000"; d="scan'208";a="1411398" Received: from unknown (HELO [10.0.10.3]) ([202.69.173.90]) by avmxsmtp2.comclark.com with ESMTP; 01 Jun 2010 10:58:43 +0800 Message-ID: <4C047761.2040403@comclark.com> Date: Tue, 01 Jun 2010 10:58:41 +0800 From: Aiza User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Chris Hill References: <4C046937.2030905@comclark.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "questions@freebsd.org" Subject: Re: unexpected operator .sh error X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jun 2010 02:58:46 -0000 Chris Hill wrote: > On Tue, 1 Jun 2010, Aiza wrote: > >> Added some code to a .sh script. >> When I run the script works but issues this message >> [: =: unexpected operator >> >> No line number telling where to look. >> I am not ever sure its talking about. >> >> IS [: whats wrong or =: > > I'd guess that what you added includes something like > if [ x=y ] > ... > > The open-square-bracket, [, is another name for test. IIRC the equal > sign is not valid in that context. > > Can you post the 'before' and 'after' versions of that part of your > script? It would help us in determining what the problem is. > > -- > Chris Hill chris@monochrome.org That hint got me to the correct line I had if [$1 = "basejail" ]; then I changed it to if $1 = "basejail"; then and got error msg =: not found