Need ideas in shell script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need ideas in shell script
# 1  
Old 03-18-2015
Need ideas in shell script

Hi Gurus,

I need a simple logic idea what can be done in the below shell script.

I written a script to do a automated maintenance work on every month of 15th and I have scheduled it through the crontab. I need to send an alert email to the user before 24 hrs of that maintenance script run.

do I need to schedule a script script for the alert email before the main script.
# 2  
Old 03-18-2015
Hi

You make a script to execute, in which (suggested) full paths to the 'executed' files lead (aka, /bin/mail [opts] [args]).
Then you add the crontab line, to exectue above script.

Or was your question of a different topic?

hth

Last edited by sea; 03-18-2015 at 10:42 AM..
# 3  
Old 03-18-2015
before executing the original script in crontab I need to intimate to the user that maintenance script will run in next 24 hrs.
can you tell me how I can send it.
# 4  
Old 03-18-2015
Why don't you schedule the mail script on the 14th of every month?
# 5  
Old 03-18-2015
For this i would recomend to use 2 crontab entries and 2 scripts.

First crontab/script to inform the admin/user that the maintainance script will run in 24 hrs (so the next day)
Second crontab/script to execute the maintainance script.

For how to send a local mail to the user, please use the search function of the forum.
Search for like: send mail
And have a look at some code blocks in the listed threads.

Hope this helps
# 6  
Old 03-18-2015
thanks for your idea and it help us.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Distributing script projects, suggestions/ideas?

Heyas If you recall, not too long ago, i was asking about the GNU Autotools. The feedback on that was almost unisense, and me figured that it turned my (back then) +98% SHELL project into a +73% GROFF project... :( Felt a bit overhelmed, specialy since i didnt actualy use or need the true... (0 Replies)
Discussion started by: sea
0 Replies

2. Shell Programming and Scripting

Learning project ideas - shell, python, UNIX tools, system administration

Hi guys, I am currently working as a system administration engineer, administering telecom applications on linux/unix platforms. I want to learn new things and improve the ones that i have and for this i though to really work on some project or something but i lack of ideas. I want to be... (2 Replies)
Discussion started by: capitanui
2 Replies

3. UNIX and Linux Applications

Need ideas for graduation project based on unix or linux Need ideas for graduation project based on

Dear all, i am in last year of electronics department in engineering faculty i need suggestions for a graduation project based on unix or free bsd or linux and electronics "embedded linux " i think about embedded unix for example or device drivers please i need helps (1 Reply)
Discussion started by: MOHA-1
1 Replies

4. Shell Programming and Scripting

BASH script problem using find, ideas?

Hi, I'm trying to write a script to search through my computer and find all .jpg files and put them all in a directory. So far I have this: for i in `find /home -name '*.jpg' ` ; do mv $i home/allen/Pictures/PicturesFound ; done When I run it, I get this error (this is only part of it, it... (2 Replies)
Discussion started by: FortressPTH
2 Replies

5. Shell Programming and Scripting

Problem with Script that writes max lines of a file - Any ideas how to fix?

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (4 Replies)
Discussion started by: mmiller99
4 Replies

6. Shell Programming and Scripting

any ideas?

i need to compare to dates/times given in the format MMDDhhmmYY. That is month, day, hour, minute, year. It is a 24 hour clock. I need to compare two dates to check that they are, say, less than 900 seconds apart. I have got to a point where it checks the time, turns the values into seconds and... (5 Replies)
Discussion started by: fwabbly
5 Replies

7. Shell Programming and Scripting

Shell Scripting Help/Ideas?

I understand the code in the following may not be perfect, but I'll work that out. I'm more looking for ideas on how to do what I need more efficiently. I have log files that are archived each day so today's log is called nmslog, yesterday's is nmslog.1.gz, 2 days ago nmslog.2.gz, etc. I want... (4 Replies)
Discussion started by: earnstaf
4 Replies

8. Shell Programming and Scripting

ideas for perl script - strings,conditionals..etc

I have a matrix , how do I compare all the elements of a column , lets say I want to check if the columns contain the alphabets "S","H","A","R","A","T". and not "X"s. Lets say matrix looks something like this .. SSSXSH HHXXHA AAXXAT RRRXRS AAXTAR TTTTTA I can hard code it where... (4 Replies)
Discussion started by: sharatz83
4 Replies

9. Cybersecurity

Any Ideas !!!!!!!!!!

Hi, I installed sybase server on a LINUX server. I assigen port 2025 whilst installation for sybase , later i uninstalled sybase and when i try to reinstall sybase and use port 2025 it throw up error saying that it is already in use, use other port number. How can I re-use the same port number... (2 Replies)
Discussion started by: suda
2 Replies

10. Shell Programming and Scripting

Any Ideas?

I have several staging directories on my UNIX server. /usr2/data1 /usr2/data2 /usr2/data3 /usr2/data4 /usr2/data5 /usr2/data6 In these directories a file is transferred from different PC's connected to the network via TCP/IP. The File name is constant for all directories. Transfers... (1 Reply)
Discussion started by: Docboyeee
1 Replies
Login or Register to Ask a Question