Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Printing square brackets and backslashes
- X-seq: zsh-users 9544
- From: DervishD <zsh@xxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Re: Printing square brackets and backslashes
- Date: Mon, 24 Oct 2005 02:04:08 +0200
- In-reply-to: <20051023214319.GA633@DervishD>
- Mail-followup-to: Zsh Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: DervishD
- References: <20051023214319.GA633@DervishD>
Hi all :)
Just a note:
* DervishD <zsh@xxxxxxxxxxxx> dixit:
> Hi all :)
>
> $ print \[\\\]
> []
> $ /bin/echo -e \[\\\]
> [\]
> $ print -r \[\\\]
> [\]
> $ print \\
> \
I can understand the first case, but I don't understand the last
one: in the first case, what I misunderstood is that the shell quotes
the chars, producing "[\]" and "print" prints them, interpreting some
escape directives: "[]". But in the last case, nothing should then be
printed, because zsh quotes the backslash and "print" gets a single
backslash, that is, an empty escape directive that shouldn't print
anything :? Is "print" assuming that a single backslash is not an
empty escape directive? Is a single, isolated backslash a synonim for
"\\"?
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...
Messages sorted by:
Reverse Date,
Date,
Thread,
Author