king vash
September 4th, 2009, 12:44 AM
I have a shell script which takes a string (with newlines in it) as a parameter. It then sends that to another program.
called like "sh printer.sh "Hello \n World"
when I use it later in the program the \n has been converted to a newline character. I need it to not echo with a newline character but with a "\n"
"echo $1" prints
"Hello
World"
were I want "Hello \n Wold".
any ideas?
called like "sh printer.sh "Hello \n World"
when I use it later in the program the \n has been converted to a newline character. I need it to not echo with a newline character but with a "\n"
"echo $1" prints
"Hello
World"
were I want "Hello \n Wold".
any ideas?