From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from rwcrmhc14.comcast.net ([216.148.227.154]) by speech.braille.uwo.ca with esmtp (Exim 3.36 #1 (Debian)) id 1FSM1P-0002lA-00 for ; Sat, 08 Apr 2006 18:35:11 -0400 Received: from garrettk17.dyndns.org ([69.243.151.56]) by comcast.net (rwcrmhc14) with ESMTP id <20060408223435m1400r7e7ve>; Sat, 8 Apr 2006 22:34:35 +0000 Received: by garrettk17.dyndns.org (Postfix, from userid 1000) id 9C510170047; Sat, 8 Apr 2006 18:39:41 -0400 (EDT) Date: Sat, 8 Apr 2006 18:39:41 -0400 From: Garrett Klein To: "Speakup is a screen review system for Linux." Subject: Re: help with a bash script please Message-ID: <20060408223941.GA5592@garrettk17.lan> References: <20060408221656.GB16356@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; x-action=pgp-signed Content-Disposition: inline In-Reply-To: <20060408221656.GB16356@localhost.localdomain> User-Agent: Mutt/1.5.11 X-BeenThere: speakup@braille.uwo.ca X-Mailman-Version: 2.1.7 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, 08 Apr 2006 22:35:11 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Greg, What you're looking for is if [ !-r filename ]; then #commands here; fi HTH, Garrett On Sat, Apr 08, 2006 at 03:16:56PM -0700, Gregory Nowak wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi all. > > I'm having trouble with an if statement in a bash script I'm > writing. What I want to do, is to check if a file doesn't have read > permission. What I'm doing is: > > if !([ -r filename]) > > However, bash says that the command [-r is not found on line > number. Can someone please tell me what I'm doing wrong, and show me > how to do what I want to do properly? Thanks in advance. > > Greg > > > - -- > 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) > > iD8DBQFEODZY7s9z/XlyUyARAgVJAKCyow1QR5lo7DjsNxUfAavCO86gFQCgmC+i > S58rlWJzeICulyaj9sKfono= > =QG4s > -----END PGP SIGNATURE----- > > _______________________________________________ > Speakup mailing list > Speakup@braille.uwo.ca > http://speech.braille.uwo.ca/mailman/listinfo/speakup -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iQIVAwUBRDg7rfQ3GgYHRr/HAQKv4A/+N0D2A7fSOgT0naxv05LQpWTfLLJAM8RE rORVunmgcrY+uKCnP0KIOBYGQz4PgHtqd5TMqO8NNIUBvvHQkOMMEmU0FpTuYhTI 4XuTjQZGSKbD4DhCNoIadi+56+9rjdWhsdiI4wtlrpYgWLoKdHRmuqEPgcS3yy8S BnlcXWbKHFH+/iypxd4li17dFem3XHKoB3nlIqMl6nIqLIFlJXPSjMlIXJpgfLXF PN4vhTy3+dVClxz5ShPAAIwxHZjcNLb8h3usCnKQS0dNY3+Zxrv1TM/3f5pTHsm1 xFKWe89U+1HUrzox86ivIDfiUl2/UDxroYKksPYbPfIt2qFDJRUu5TS9+vOYHvsn GpCQ8xC8/DJLP24MWH+0P0uHSkFt/rtm38sLIDm4DIEJrm73KLvkQCG6anps41FS boOt4g/5nsKhy2HV0VFI7ZwpZinTzDk2+eH3X82PQs7EsZXoHzdOyS/q+yKXQZlZ xZ+Z7AW8PasmDNa4q+K/ZpNI0Nf9KsmFZ6ltUUr2jt967zmb5EFMMhXv62ot5TBe RY/yGFm6VCU18VRfwqIglc6/3tFpMVh/WNMLevJL5AX7UN6dn6r94NDKgnzs8EUI nCnB7eU6u7EeC0ocvHjCtCvwRsLwDwPvo0RR1lMTXG6Q4f5+WtD/qy0BATYNerhw UiSE/mEnEj8= =0Vdh -----END PGP SIGNATURE-----