From owner-freebsd-questions@FreeBSD.ORG Mon Jan 9 20:20:11 2006 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D3A8116A41F for ; Mon, 9 Jan 2006 20:20:11 +0000 (GMT) (envelope-from frankstaals@gmx.net) Received: from smtp2.versatel.nl (smtp2.versatel.nl [62.58.50.89]) by mx1.FreeBSD.org (Postfix) with ESMTP id 96F8A43D45 for ; Mon, 9 Jan 2006 20:20:08 +0000 (GMT) (envelope-from frankstaals@gmx.net) Received: (qmail 4757 invoked by uid 0); 9 Jan 2006 20:20:07 -0000 Received: from unknown (HELO [192.168.2.5]) ([62.59.173.176]) (envelope-sender ) by smtp2.versatel.nl (qmail-ldap-1.03) with SMTP for < >; 9 Jan 2006 20:20:07 -0000 Message-ID: <43C2C59A.6020906@gmx.net> Date: Mon, 09 Jan 2006 21:20:42 +0100 From: Frank Staals User-Agent: Mozilla Thunderbird 1.0.7 (X11/20060105) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dan Nelson References: <43C2BE4A.4070601@gmx.net> <20060109195427.GC89638@dan.emsphone.com> In-Reply-To: <20060109195427.GC89638@dan.emsphone.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: questions@freebsd.org Subject: Re: Shellscript syntax question 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: Mon, 09 Jan 2006 20:20:12 -0000 Dan Nelson wrote: >In the last episode (Jan 09), Frank Staals said: > > >>I'm trying to write a ( simple ) shellscript to move files arround, >>for this reason I wanted to check wether 'episode_last' has a higher >>value than 'episode_first' ( so that last can't be 3 if first is 60 >>). So I tried : >> >>*if** [* ${episode_last} < ${episode_first}* ]*; *then >> >>fi >> >>*As I thought what would have been the correct syntax, but I got this error >>when running the script : >>./massmove: line 136: 05: No such file or directory >> >> >>'05' was the value of $episode_first and '01' was the value of >>$episode_last >> >> > >You want "-lt" not "<". "<" is a file redirect, which is why the shell >complained that it couldn't find a file named "05". I also assume all >those asterisks aren't in your script. > > > About the asteriks : No they weren't but for some reason Thunderbird had problems with the color remaining from the KATE Syntax-hilighting. Anyway: thanks for the solusion, but what would be the expressions for ">" "less or equal" and "greater or equal" ? -- -Frank Staals