From owner-freebsd-questions@FreeBSD.ORG Mon Jan 9 19:51:39 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 8171516A420 for ; Mon, 9 Jan 2006 19:51:39 +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 387CA43D46 for ; Mon, 9 Jan 2006 19:51:29 +0000 (GMT) (envelope-from frankstaals@gmx.net) Received: (qmail 20182 invoked by uid 0); 9 Jan 2006 19:51:27 -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 19:51:27 -0000 Message-ID: <43C2BEE2.6020306@gmx.net> Date: Mon, 09 Jan 2006 20:52:02 +0100 From: Frank Staals User-Agent: Mozilla Thunderbird 1.0.7 (X11/20060105) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Frank Staals References: <43C2BE4A.4070601@gmx.net> In-Reply-To: <43C2BE4A.4070601@gmx.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 19:51:39 -0000 Frank Staals wrote: > Hey, > > 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 > Can someone tell me what I'm doing wrong/ what it should be and where > I could find such info. I tried searching in google about this, but I > wasn't able to find anything usefull. > Thanks in advance > damn The copied collors in the syntax-hilighting in KATE screwed up my code: it should be: if [ ${episode_last} < ${episode_first} ]; then fi -- -Frank Staals