Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Conditional Bug?



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