- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Need a little help with a script
Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp
Knowledge Base
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
07-18-2007 09:45 PM
07-18-2007 09:45 PM
This is a modified snippet of a script I'm trying to write:
********************************
FILE_NAME=$OUTPUT_DIR"/SEC101.log"
sqlplus /nolog <
spool "$FILE_NAME"
SELECT * FROM V\$VERSION
quit
FILEOF
grep -v "SQL>" $FILE_NAME > $TEMP_FILE
echo "Done!"
echo "Continuing to section 2..."
********************************
Well, anything I write after the closing FILEOF (the last 3 lines) didn't seem to be executed at all.
Did I miss something or do something wrong?
Thanks,
=adley=
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2007 09:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2007 09:58 PM
07-18-2007 09:58 PM
Re: Need a little help with a script
If you have leading tabs, you need <<-FILEOF.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2007 11:11 PM
07-18-2007 11:11 PM
Re: Need a little help with a script
Yaroslav, thanks, sh -x somehow slipped my mind. I was too busy swearing :)
Dennis, thanks, you're right, in my original script file, there was something in front of FIELOF. Not a tab, but some spaces. Apparently it's the spaces that caused this, don't know why. Deleting all the spaces solved the problem. Or replace them with tabs and specify -FILEOF at the beginning did the trick as well.
Thanks a lot guys,
=adley=
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2007 06:58 PM
07-19-2007 06:58 PM
Re: Need a little help with a script
file may be you don't have the right to write your file
Do you connect succesfully with / as sysdba ?
may be the connection ask a passwd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2007 01:55 PM
07-22-2007 01:55 PM
Re: Need a little help with a script
The problem has been solved. The root cause is as I said in my previous post :)
Somehow spaces and tabs are the culprits, not read/write permission and not the SYS password. Don't ask me why though, 'cause I just know this myself.
=adley=