Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Why this doesn't work?
- X-seq: zsh-users 8590
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Re: Why this doesn't work?
- Date: Sat, 12 Mar 2005 20:49:40 +0000
- In-reply-to: <20050312101450.GA5656@DervishD>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20050312101450.GA5656@DervishD>
On Mar 12, 11:14am, DervishD wrote:
} Subject: Why this doesn't work?
As long as I'm passing out netiquette lessons, I might as well say
that it would be nice if the word "this" in that Subject had been
replaced by a slightly more descriptive phrase.
} $ eval printf -- "Hello\\n"
} Hello$
If this is really what you're seeing, then something is indeed wrong.
What you should see is "Hellon", not "Hello".
} $ eval printf -- "Hello\\\n"
} Hello<newline>
}
} I mean, no newline character is output when using just two
} backslashes, and I don't understand that.
Remember that when you use "eval" the command line is actually parsed
twice. So
eval printf -- "Hello\\n"
is equivalent to
printf -- Hello\n
The first parse removes the quotes and one of the backslashes, and the
second parse removes the remaining backslash.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author