Find the answer to your Linux question:
Results 1 to 1 of 1
Hi, I wish to replace a new line with br (html) but it doesn't seem to work Code: message=$(echo ${FORM_message} | tr '\r' '<br \/>' ) what it gives me ...
  1. #1
    Just Joined!
    Join Date
    Feb 2011
    Posts
    5

    replace new line with <br />

    Hi, I wish to replace a new line with br (html) but it doesn't seem to work
    Code:
    	message=$(echo ${FORM_message} | tr '\r' '<br \/>' )
    what it gives me seems to be ... b...?


    I am also having problem escaping hash sign in cut command:
    Code:
    list=$(echo "$line" | cut -d'\#;\#' -f1) ;
    my intention is to split the line with "#;#"
    thanks
    Last edited by ted_chou12; 02-06-2011 at 05:47 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...