I am supposed to write an script that does some tasks like below:
I am not a newbie. However, I am looking for a quick input from you before
I can delve into the language features. Can somebody please help me what kind of scripting language
I should use? Should it be perl or Shell scripting? I think there is also some "awk" work.
The shell that I am using is bourne/hp-ux. So, how do I know if bourne supports all the features?
There could be some more tasks in future. What is the best way to implement it? Some of the portions
may be reuseable. Could you please comment if there is anything that cannot be done (from below)?
Here are some tasks:
Monitor disk space, Notify (via email) when something wrong (bdf -bi)
Monitor free blocks via unix, Notify (via email)when something wrong (df -k)
select count(*) from a few tables in oracle, notify (via email)when something wrong
Changing file name extension (file name extension has a number that needs to be calculated)
Moving files to a different directory
Monitor processes .. ( 3 processes must always be running otherwise notify (via email))
Search a file for keywords (Need to monitor the content of file)
Creating a file
su as root, (some notifications depending on condition)
issue a command
check date and time on processes
issue ls -l, if files with .XXX ext'n are found, notify
change dir, if files older than today, notify
I would greatly appreciate any suggestions/comments/questions from you. Will appreciate if you can suggest a good tutorial/book for generic shell programming