Quote:
Originally Posted by
donpasscal
[I've removed several pointless trs and greps and replaced the echos with printfs. Do you really need that!]
Thank you for the help i will test what you have provided and update the thread. I guess i do need them (trs) to stay in place.... i am just trying to mod the script that my lead gave me and he would not like that many changes made.
Actually that question was aimed at the sed command, not the use of
tr to suppress newline generation.
Quote:
@apmcd47 ...Please see if you can help me figure this out....please.....!!!
This expect script is suppose to connect to SERVER DB01 that hosts two databases and pull the alert and listener log files sizes. The problem i am having is that the correct alert log/size file is pulled for both databases but the wrong listener log/size is pulled for testdb2...because in the output (below) the sid is set to testdb1 instead of testdb2. I need help in directing the script ot set the correct sid and to pull from the correct path for testdb2. I will also like the output to be in MB because i only want to print out the log files larger that 500MB and mail them out every day , then every friday i mail out the complete output.
I'm sorry, I know nothing about
expect and don't really know enough about Oracle to help you. My advice at this time would be to log onto the server and figure out how to get this to work interactively and then put what you have learnt into the expect script. If they won't let you do this, because it's a production server, then ask to use the development server.
I gave you two possible ways of getting the file size in MB in my last post; can you use either of them in your script?
And please, when posting code, use the CODE tags. It makes it easier to understand the code.
Andrew