Zsh Mailing List Archive
Messages sorted by:
Re: Conditional Bug?
- X-seq: zsh-users 12132
- From: jadamson@xxxxxxxxxxxx (Joel J. Adamson)
- To: Peter Stephenson <pws@xxxxxxx>
- Subject: Re: Conditional Bug?
- Date: Mon, 29 Oct 2007 13:05:05 -0400
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <200710291503.l9TF3Tt9018661@xxxxxxxxxxxxxx> (Peter Stephenson's message of "Mon\, 29 Oct 2007 15\:03\:29 +0000")
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <87fxzuou1b.fsf@xxxxxxxxxxxxxxxxxxxxxxxx> <200710291503.l9TF3Tt9018661@xxxxxxxxxxxxxx>
Peter Stephenson <pws@xxxxxxx> writes:
> 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.
Okay, I've done some more testing and found that the problem is with
my parameter assignment. In the tar invocation, I need all the
filenames submitted in the command, and various combinations of $* and
$@ with and without quotes don't seem to work: they either use the
whole list as a single argument, which brought up the error I
originally posted, or only use the first directory (~/ado in my
What is the proper way to refer to all command line arguments?
Joel J. Adamson
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA 02114
The information transmitted in this electronic communication is intended only for the person or entity to whom it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this information in error, please contact the Compliance HelpLine at 800-856-1983 and properly dispose of this information.
Messages sorted by: