script giving error

Hi All,

i have an small issue...

echo " "
eval x=$@
export x=`echo $x`
echo $x
ssh user@ipadrss; cd /mbbv/home/;
cd /mbbv/home/orange/orange/
echo pwd
bash samplescript.sh $x

above is my script which will triger from server A and will connect to server B for some function...but the script is not connecting to serverB
because pwd command not giving the server B location..

note: i already set up keys for passwordls connection between server A and server B..

any other suggestion..

or can anyone suggest me ...or any modification required in my scirpt..

Thanks
Sha

What's the point of repeatedly clobbering $x with inadequately quoted backticked commands? Passing "$@" correctly is hard in shell, you really want to avoid passing it to a different variable (and if you really have to, use meticulous quoting).

The parts which need to be executed on the remote server need to be passed as arguments or input to ssh.

ssh user@ipadrss cd /mbbv/home/orange/orange ';' samplescript.sh "$@"

Thanks for you Kind replay...i got what i expected..

Thanks
Sha