From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linserver.romuald.net.eu.org ([63.228.150.209]) by speech.braille.uwo.ca with esmtp (Exim 3.36 #1 (Debian)) id 1FXOAt-0008Qz-00 for ; Sat, 22 Apr 2006 15:53:48 -0400 Received: (qmail 19882 invoked by uid 1000); 22 Apr 2006 12:53:13 -0700 Date: Sat, 22 Apr 2006 12:53:13 -0700 From: Gregory Nowak To: "Speakup is a screen review system for Linux." Subject: Re: IF Help Message-ID: <20060422195313.GB19750@localhost.localdomain> References: <005f01c6663e$e093dcb0$1d02a8c0@sparky> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; x-action=pgp-signed Content-Disposition: inline In-Reply-To: <005f01c6663e$e093dcb0$1d02a8c0@sparky> X-PGP-Key: http://www.romuald.net.eu.org/pubkey.asc User-Agent: Mutt/1.5.11+cvs20060403 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: Sat, 22 Apr 2006 19:53:49 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 There is no man page for the if command. What you want to look at is the bash(1) man page, which is a long one. I am by no means an expert when it comes to bash programming, so I do stand to be corrected, but from what I noticed, 2 problems come to mind right away when looking at your if statement. First, you want to enclose the condition part in brackets. Second, since file, and number, are shell variables, they should be in all caps. So, rewriting your below code snipit with the 2 fixes I mentioned would look like: if [ date -r $FILE +%V -lt $NUMBER ]; then #statements fi Hth. Greg 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 - -- web site: http://www.romuald.net.eu.org gpg public key: http://www.romuald.net.eu.org/pubkey.asc skype: gregn1 (authorization required, add me to your contacts list first) - -- Free domains: http://www.eu.org/ or mail dns-manager@EU.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFESomp7s9z/XlyUyARAlW9AJ96N8O3qTXuKYHVijICUShfjqBSXwCgqRM6 xBTxx4KF10KD3JmTNRTZF/U= =9OTu -----END PGP SIGNATURE-----