Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Conditional Bug?
- X-seq: zsh-users 12131
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Conditional Bug?
- Date: Mon, 29 Oct 2007 15:03:29 +0000
- In-reply-to: <87fxzuou1b.fsf@xxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <87fxzuou1b.fsf@xxxxxxxxxxxxxxxxxxxxxxxx>
Joel J. Adamson wrote:
> I'm using I have the following script to backup my important files, and I've
> been running it from cron and getting errors from the tar command.
> I'm concerned about the conditional at line 22: is my usage wrong or
> is this a bug? The conditional says that the file exists (when it
> does not) and therefore runs the "--update" version of tar.
>
> +backup:7> [[ -e /mnt/backup/backup.tar.bz2 ]]
Yes, that tests whether the file exists and returns true if it does.
There's very little likelihood of this being a simple bug in -e, but if
this is a special file system, or permissions are weird, or something,
maybe it could go haywire. The only way of finding out is to see what
system tests return for that path.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author