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

Re: string to array space problem in filenames



On Thu, 3 Sep 2015 08:58:04 -0700
Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
> however one further question:
> 
> 	print -rl - "${array[@]}" > file
> 
> ... do I or don't I like the double dash that seems to usually be there?
> And a few code specimens have shown no dash(es) at all there, which scares
> me since disaster is never far away from the unwary.

"-" is a longer standing way of doing things here; "--" is a more recent
standard.  Unless you're using a very old version of the shell it
doesn't matter.

Yes, getting into the habit of using those anyway is a good idea.  If
you're dealing with file names absolute paths, though, you'll get away
with on this occasion.

pws



Messages sorted by: Reverse Date, Date, Thread, Author