Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Printing square brackets and backslashes
- X-seq: zsh-users 9543
- From: DervishD <zsh@xxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Printing square brackets and backslashes
- Date: Sun, 23 Oct 2005 23:43:19 +0200
- Mail-followup-to: Zsh Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: DervishD
Hi all :)
$ print \[\\\]
[]
$ /bin/echo -e \[\\\]
[\]
$ print -r \[\\\]
[\]
$ print \\
\
I was expecting the second when issuing the first command...
As I understand, the string should be interpreted as "a quoted
opening square bracket, a quoted backslash, a quoted closing square
bracket", but it is not :?? But in the last case, "print" is
correctly quoting the backslash :?
I discovered this when I accidentally created a file named "[\]"
when testing the behaviour that one of my scripts has with weird
characters, and then I did "print *" and got that problem.
What am I misunderstanding here? Thanks a lot in advance :)
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