LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   doing a sequence of commands in a bash script. (https://www.linuxquestions.org/questions/linux-newbie-8/doing-a-sequence-of-commands-in-a-bash-script-847969/)

xeon123 12-02-2010 11:45 AM

doing a sequence of commands in a bash script.
 
Hi,

I'm creating a bash script that contains the following line:
"ssh user@$server1 cd /tmp; pwd"

What I want is to print /tmp of server1, but the script it isn't printing that.

How can I do that in the script?

Thanks,

Tinkster 12-02-2010 11:47 AM

Change
Code:

"ssh user@$server1 cd /tmp; pwd"
to
Code:

ssh user@$server1 "cd /tmp; pwd"

xeon123 12-02-2010 11:49 AM

thanks, it worked.


All times are GMT -5. The time now is 06:10 PM.