- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: scripting question
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
- 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
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
12-10-2001 10:30 AM
12-10-2001 10:30 AM
svrmgrl >/dev/null <
shutdown immediate
exit
EOF
echo "shutdown Complete"
The last line does not execute. How EOF is being used. Oracle is being shutdown.
Thanks for help
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2001 10:35 AM
12-10-2001 10:35 AM
Re: scripting question
put echo "shutdown complete" before exit command. EOF stands for the End Of File
HTH,
Shiju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2001 10:40 AM
12-10-2001 10:40 AM
Re: scripting question
try this,
svrmgrl >/dev/null <
shutdown immediate
exit
echo "shutdown Complete"
EOF
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2001 10:41 AM
12-10-2001 10:41 AM
Re: scripting question
The other item you may want to check is that the output is being routed to /dev/null. You may want to send it to a file instead. Also, if this is being run from cron, any errors this process generates will be routed to e-mail, so you may want to consider logging standard error to a file as well.
--
mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2001 10:50 AM
12-10-2001 10:50 AM
Re: scripting question
Actually, it should work. The shell should process everything up to the 'EOF' as standard input for you svrmgrl command. The exit should thus refer to svrmgrl rather than an exit statement for the shell. This should have worked and your echo should have worked as expected. By the way, there is nothing special about 'EOF' you could have used 'end_of_commands', '!EOF!', or 'I_am_finished' as long as you specify it EXACTLY the same in both plasces. The most common mistake is to place whitespace before your markers in one place but not the other.
' EOF' is not the same as 'EOF'.
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2001 11:11 AM
12-10-2001 11:11 AM
Re: scripting question
I used Sanjay's and Shiju's case and created this
echo start <
echo two
echo three
EOF
echo go
I get output as
start
go
echo one
echo two
are not executed.
Clay
That is what i think that the final echo command should have worked. where is the mistake
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2001 11:19 AM
12-10-2001 11:19 AM
Solutionecho start <
echo two
echo three
EOF
echo go
I would only expect you to see 'start' and 'go' in this case. Your 'here docs' is say use everything up to EOF as stdin for the command echo start. But since, echo ignores stdin only the ARGUMENT start is processed. The shell returns after the EOF and you execute the echo go. This is working just as you would expect. Again, there is nothing wrong with your svrmgrl script unless you are missing whitespace that does not post very well. Look for leading spaces or tabs - that will clobber you 'here docs' everytime.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 06:17 AM
12-11-2001 06:17 AM
Re: scripting question
Clay, there was an additional tab at the end of EOF.
Issue is resolved now. Thanks for help Guys