I know there are quite a few IT guys here, so I'm sure some have more experience working in UNIX than I do.
Here is my problem:
Once a week I have a cronjob that runs to check the indexes on our Unidata database for corruption.
I didn't build this script, I just know what it does.
When the job runs, it creates a file in /tmp called index.err.
# more index.err
PHANTOM process 28579 started.
COMO file is '_PH_/root23402_28579'.
Inside that file, I get the name of the actual phantom process that runs. If I browse to _PH_ directory and view the root23402_28579 file that has all the information I need to see related to the index checker.
I'd like to create a cronjob that will email me the contents of that file. I can easily use a mailx command to send the email, but the problem is that file name will change every week.
Do any of you know how I can extract the file name in a variable to then call when I do my mailx command?
Hopefully that all makes sense. Let me know if you have any questions.
Here is my problem:
Once a week I have a cronjob that runs to check the indexes on our Unidata database for corruption.
I didn't build this script, I just know what it does.
When the job runs, it creates a file in /tmp called index.err.
# more index.err
PHANTOM process 28579 started.
COMO file is '_PH_/root23402_28579'.
Inside that file, I get the name of the actual phantom process that runs. If I browse to _PH_ directory and view the root23402_28579 file that has all the information I need to see related to the index checker.
I'd like to create a cronjob that will email me the contents of that file. I can easily use a mailx command to send the email, but the problem is that file name will change every week.
Do any of you know how I can extract the file name in a variable to then call when I do my mailx command?
Hopefully that all makes sense. Let me know if you have any questions.