Hey that worked great as well. Thanks. I have one more doubt.
I want to retain the result of this variable whenver i am logging into a server . When i am echoing the result of this variable inside server , it is showing blank.
i.e.
$ var1="x";
$ var2="y";
$ var3=$var1$'\n'$var2;
ssh Server
echo "$var3"
---blank---
Actually, i want to do this as due to some reason, i am not able to send mail from putty terminal. the following command is not working(not receiving mail). It is only working inside the server(receiving mail) . If anyone can shed light on this as well, it would be great.