- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Executing Multiple command in remsh
Operating System - HP-UX
1820882
Members
3566
Online
109628
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2004 03:57 AM
тАО07-08-2004 03:57 AM
Hello,
I would like to execute the following commands from the user cn2adm.
cd /usr/sap/trans/bin
/sapmnt/CN2/exe/tp connect CN2
Note: command has to execute under the /usr/sap/trans/bin directory.
Now I want to execute these commands from root:
remsh venus -l cn2adm -n cd /usr/sap/trans/bin"
remsh venus -l cn2adm -n "/sapmnt/CN2/exe/tp connect CN2"
Instead of multiple remsh commands, how can I execute in one remsh command?
Thanks,
Nikee
I would like to execute the following commands from the user cn2adm.
cd /usr/sap/trans/bin
/sapmnt/CN2/exe/tp connect CN2
Note: command has to execute under the /usr/sap/trans/bin directory.
Now I want to execute these commands from root:
remsh venus -l cn2adm -n cd /usr/sap/trans/bin"
remsh venus -l cn2adm -n "/sapmnt/CN2/exe/tp connect CN2"
Instead of multiple remsh commands, how can I execute in one remsh command?
Thanks,
Nikee
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2004 04:03 AM
тАО07-08-2004 04:03 AM
Solution
Hi Nikee,
You can try
remsh venus -l cn2adm -n "cd /usr/sap/trans/bin; /sapmnt/CN2/exe/tp CN2"
Or you can push a script that has those two lines and execute that script.
-Sri
You can try
remsh venus -l cn2adm -n "cd /usr/sap/trans/bin; /sapmnt/CN2/exe/tp CN2"
Or you can push a script that has those two lines and execute that script.
-Sri
You may be disappointed if you fail, but you are doomed if you don't try
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2004 04:05 AM
тАО07-08-2004 04:05 AM
Re: Executing Multiple command in remsh
remsh venus -l cn2adm -n "cd /usr/sap/trans/bin ; /sapmnt/CN2/exe/tp connect CN2"
should do it
should do it
________________________________
UNIX because I majored in cryptology...
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2004 04:34 AM
тАО07-08-2004 04:34 AM
Re: Executing Multiple command in remsh
Hai,
remsh is going to use the remote shell. But the shell commands execution are same as local cell except the environment variables.
If we want to use the environment,
remsh otherhost . .profile 2>&- \;
We can use the ; to add the multiple commands in remote shell as local shell.
And We can put all commands in a file and make rcp to remote machine. Then do the remsh to execute that script commands.
Another way as,
echo "cd /usr/sap/trans/bin;/sapmnt/CN2/exe/tp connect CN2" | remsh "cat -"
Regards,
Muthukumar.
remsh is going to use the remote shell. But the shell commands execution are same as local cell except the environment variables.
If we want to use the environment,
remsh otherhost . .profile 2>&- \;
We can use the ; to add the multiple commands in remote shell as local shell.
And We can put all commands in a file and make rcp to remote machine. Then do the remsh to execute that script commands.
Another way as,
echo "cd /usr/sap/trans/bin;/sapmnt/CN2/exe/tp connect CN2" | remsh
Regards,
Muthukumar.
Easy to suggest when don't know about the problem!
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP