zsh-users
 help / color / mirror / code / Atom feed
* Printing square brackets and backslashes
@ 2005-10-23 21:43 DervishD
  2005-10-24  0:04 ` DervishD
  0 siblings, 1 reply; 4+ messages in thread
From: DervishD @ 2005-10-23 21:43 UTC (permalink / raw)
  To: Zsh Users

    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...


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-10-24  8:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-23 21:43 Printing square brackets and backslashes DervishD
2005-10-24  0:04 ` DervishD
2005-10-24  0:30   ` Chris Johnson
2005-10-24  8:16     ` DervishD

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).