Escaping Special Characters-Help

Hi All,

I am having a trouble in passing special characters to a script. As I am new to bash script I dont know how to go and solve this.

mypwd=(a+sdfg!h#

if i pass $mypwd to a bash script, it is not accepting "(,!,+ etc". It would be a great help if some one can help to escape these characters while passing to the script.

mypwd='(a+sdfg!h#'

In Korn shell
export mypwd=`echo "(a+sdfg!h#"`

echo $mypwd
(a+sdfg!h#

There's no need for echo in Korn or any other shell. All that's needed is that the characters be quoted.

And there's no need for export unless you wart to make the variable visible to scripts called from this one.