Great !!
It worked ! Thanks, Scrutinizer.
So I feel that the " \" is not understood as a command in echo unless we use another "\" alongwith. Since if I don't remove the 'temp' file (as used in my script file), then "cat temp" gives
plot \
x**2, \
x**3, \
x**4
So one one slash has been used as an identifier of the other slash as a command.
Another important thing I required to do is to
remove the extra space before the last quote, i.e.
\ "
should be replaced by
\\"
Hope this would help others who come across the same problem.
So it also belongs to the
plotting in gnuplot using shell script
category.