- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Exit from su in a script
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
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
Discussion Boards
Community
Resources
Forums
Blogs
- 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
10-02-2000 07:32 PM
10-02-2000 07:32 PM
In a script, how do I exit from:
su - user -c "command"
and continue other operations within the script.
Thanks in advance,
YC
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2000 08:20 PM
10-02-2000 08:20 PM
Re: Exit from su in a script
su - user -c "command" 2>&1 &
Cheers,
Murray
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2000 09:22 PM
10-02-2000 09:22 PM
Re: Exit from su in a script
The subsequent operations has to be done after the completion of the "su" command. How to go about it with your suggestion ?
Rgds,
YC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2000 09:59 PM
10-02-2000 09:59 PM
SolutionI have a script which start the oracle listener demon and then start the oracle database in the same script
su - oracle -c 'lsnrctl start listener'
su - oracle -c '/oravl01/oracle/dba/util/start_ctx.sh'
su - oracle -c '/oravl01/oracle/8.0.5/ows/3.0/bin/owsctl start wrb'
. ~oracle/.profile
/oravl01/oracle/8.0.5/ows/3.0/bin/owsctl start www
su - taskman -c '/opt/OV/taskman/bin/ptm start DEV'
hope this answers your question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2000 03:58 AM
10-03-2000 03:58 AM
Re: Exit from su in a script
When you complete the command or script specified with the -c option, you will be returned to the script and environment from which you came. No special action is necessary.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2000 04:14 AM
10-03-2000 04:14 AM
Re: Exit from su in a script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2000 06:47 PM
10-03-2000 06:47 PM
Re: Exit from su in a script
Wot, still no points assigned?....
Cheers,
Murray
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2000 08:06 AM
10-04-2000 08:06 AM
Re: Exit from su in a script
su - user -c "command" 2>&1 &
wait # wait all backgrownd commands
#next command