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

Re: Conditional Bug?

Peter Stephenson <pws@xxxxxxx> writes:

> Joel J. Adamson wrote:
>> 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
>> example).
>> What is the proper way to refer to all command line arguments?
> You probably want "$@", but I don't really understand what you mean by
> "not working", since they do :-).

Okay, I've done some more experimenting (including setting the
variables to arrays and other things) and discovered that a big
problem is that when the filenames get through to the tar command,
they are quoted, and thus the tilde does not expand.  I've tried using

${(Q)<array name>}

To remove the quotes, but they are still quoted in the trace:

+/home/joel/bin/backup:48> TOBACKUP=( '~/ado' '~/data' '~/docs' '~/svn_repo' '~/Mail' '~/News' '~/lisp' '~/office-directory' '~/.emacs' '~/.emacs-custom.el' ) 

How do I completely remove the quotes for when I invoke the command?


Joel J. Adamson
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA  02114
(617) 643-1432
(303) 880-3109

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: Reverse Date, Date, Thread, Author