Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Substituting newline on a string
- X-seq: zsh-users 12995
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Substituting newline on a string
- Date: Tue, 1 Jul 2008 19:34:02 +0100
- In-reply-to: <150460.34757.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <150460.34757.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
On Tue, 1 Jul 2008 10:34:45 -0700 (PDT)
Javier Alvarado <quijotista@xxxxxxxxx> wrote:
> I have a seemingly trivial problem that I have not be able to
> solve. How do I replace a newline in a string with somethinge else, like
> ' ' (or better yet '\n')?
${string//$'\n'/\\n}
--
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author