Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Substituting newline on a string



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