New line is added to result when splitting long sed expression to multiple lines
What is the right way to split sed expression? when I'm trying to split the expression to two lines I'm getting a new line in the result.
sed -e '/server.w123.path/s/"\/usr\/lib\/u1\/"/ \ "\/var\/tmp\/"/g' < t1.test
I'll get the results in two lines
server.w123.path , /var/tmp
instead of one line(in case the sed expression is in one line:
You can not split a s command this way (you are not in your shell here but in a sed command).
Doing this, your \ is considered as a char (a newline one) added before the replacement string. In other words, you replace your pattern with \n\/var\/tmp\/