If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Shell Script help needed

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-24-04, 10:22
chatguy2020 chatguy2020 is offline
Registered User
 
Join Date: May 2003
Posts: 58
Shell Script help needed

Hello Script gurus,

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
killing processes
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
Reply With Quote
  #2 (permalink)  
Old 03-24-04, 14:35
chatguy2020 chatguy2020 is offline
Registered User
 
Join Date: May 2003
Posts: 58
Hi,

Any suggestions please?
Reply With Quote
  #3 (permalink)  
Old 03-24-04, 15:43
chatguy2020 chatguy2020 is offline
Registered User
 
Join Date: May 2003
Posts: 58
Hi,

Any suggestions please?
Reply With Quote
  #4 (permalink)  
Old 03-25-04, 08:48
aigles aigles is offline
Registered User
 
Join Date: Jan 2004
Location: Bordeaux, France
Posts: 319
You can do all in shell xith the help of somle commands like axk, sed, sqlplus ...


Sun Microsystems has a great archive of useful scripts at:

http://www.sun.com/bigadmin/scripts/index.html

Perhaps same things on HP site...
__________________
Jean-Pierre.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On