From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta09-winn.ispmail.ntl.com ([81.103.221.49] helo=mtaout03-winn.ispmail.ntl.com) by speech.braille.uwo.ca with esmtp (Exim 3.36 #1 (Debian)) id 1FXoFm-0006hJ-00 for ; Sun, 23 Apr 2006 19:44:34 -0400 Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com with ESMTP id <20060423234403.NKJH27969.mtaout03-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com> for ; Mon, 24 Apr 2006 00:44:03 +0100 Received: from sparky ([86.20.72.172]) by aamtaout04-winn.ispmail.ntl.com with SMTP id <20060423234403.FJVA16086.aamtaout04-winn.ispmail.ntl.com@sparky> for ; Mon, 24 Apr 2006 00:44:03 +0100 Message-ID: <005301c6672f$d1181ca0$1d02a8c0@sparky> From: "Chris Norman" To: "Speakup is a screen review system for Linux." References: <005f01c6663e$e093dcb0$1d02a8c0@sparky> <20060423164955.GA12848@sunset.net> Subject: Re: IF Help Date: Mon, 24 Apr 2006 00:44:06 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-BeenThere: speakup@braille.uwo.ca X-Mailman-Version: 2.1.8rc1 Precedence: list Reply-To: "Speakup is a screen review system for Linux." List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Apr 2006 23:44:35 -0000 Cheers mate. Chris Norman ----- Original Message ----- From: "Ralph W. Reid" To: "Speakup is a screen review system for Linux." Sent: Sunday, April 23, 2006 5:49 PM Subject: Re: IF Help > You were very close for not finding the info in a man page. If I can > assume you are using the bash shell, then the 'if' command is > described somewhere in the midst of the bash man page (it's a _big_ > man page, but lots of good stuff is in there). > > I suppose you want to use the output of a command in a comparison. > This means that the command should be enclosed in accent marks. Also, > you need some brackets, a semicolon, and the word 'then' to complete > the syntax. Here is what I think you want (note that the spacing > around the brackets is important, as well as all of the punctuation in > the 'if' line): > > if [ `date -r $file +%V` -lt $number ]; then > echo It be. > else > echo It be not. > fi > > HTH, and have a _great_ day. > > On Sat, Apr 22, 2006 at 07:59:24PM +0100, Chris Norman wrote: >> Hi people, >> I want to use the if command, but can't find any manual page for it. >> >> I want to use it to run a command, and at present, I have: >> >> if date -r $file +%V -lt $number; then >> #statements >> fi >> >> But it won't work. >> >> $file is a filename. How do I do this? >> >> Cheers, >> >> Chris Norman >> >> _______________________________________________ >> Speakup mailing list >> Speakup@braille.uwo.ca >> http://speech.braille.uwo.ca/mailman/listinfo/speakup > > -- > Ralph. N6BNO. Wisdom comes from central processing, not from I/O. > rreid@sunset.net http://personalweb.sunset.net/~rreid > ...passing through The City of Internet at the speed of light! > 1 = x^0 > > _______________________________________________ > Speakup mailing list > Speakup@braille.uwo.ca > http://speech.braille.uwo.ca/mailman/listinfo/speakup