« Return to Thread: Shell script - insert newline into string

Shell script - insert newline into string

by Tony Wilson-4 :: Rate this Message:

Reply to Author | View in Thread

Hi

I'm kind of embarrassed to ask this but I'm stuck!

I'm writing a shell script and need to insert a line feed into a string. For some reason \n does not work on the NSLU2.
Nor does stuff like:

message="Subject:Test

Body of message here"

(ie newline within string)

Echo is not adding a new line when used to extend the string.

Please help!!!!

Tony

 « Return to Thread: Shell script - insert newline into string