I am trying to set an environment variable in a shell script so that it'll contain two lines of text. According to what I found on the web I think all I need to use a "\n" for a new line, but it doesn't seem to work.
For instance:
Code: Select all
[root@verticatest1 ~]# test="line1\nline2"
[root@verticatest1 ~]# echo $test
line1\nline2
Code: Select all
[root@verticatest1 ~]# echo $test
line1
line2