11-06-2009
Scripting needed for newbie
Hi,
I am newbie in shell scripting
I have a file name like simple.txt which comes from Mainframe systems onto windows dir every 15 minutes daily. File name is same. Every 15 minutes it updates.
I need to write shell script to check if the file arrived every 15 min or not.
If the new file has not arrived after 30 min, I need to exit and send message and also generate log file with start-time and end-time.
At the end of the day I also need to generate another log with Start time and end-time as fields.
Please help me in scripting
10 More Discussions You Might Find Interesting
1. UNIX Desktop Questions & Answers
I have an Ultra5 with 2.56 that is connected to a network. We don't use a proxy server on the network but access the internet directly through a gateway. How do I configure the Solaris box to see the internet?
Opening the internet explorer and setting HTTP; FTP etc ports to the ip of the... (3 Replies)
Discussion started by: FattyLumpkin
3 Replies
2. HP-UX
Hi friends
i dont know whether it is the right forum to ask this or not. if its not please excuse me and please give me the link for such a forum.
i am novice about HP 9000 rp3410 server and its things but i had to install and configure it. I came to know that it doesnot comes with builtin... (4 Replies)
Discussion started by: bnaravinda
4 Replies
3. UNIX for Dummies Questions & Answers
I'm relatively new at this scripting game, just need to learn some basic stuff for data handling.
My current need is to write a script that loops through a textfile of filenames, and for each file removes the first line and re-writes that file to a new name.
In fact I could do with knowing... (1 Reply)
Discussion started by: mattyjim2
1 Replies
4. Shell Programming and Scripting
Seems simple but I am having difficulty with this one: I am trying to write a single command line argument (which will be a path) - the program should print out the owner of the path.
I can not get anything I write to run.
Please help. (5 Replies)
Discussion started by: Kymmers7
5 Replies
5. Shell Programming and Scripting
I have written a script that will email a generic user when a device is "offline". I would like to enhance this by having the script lookup a contact's email and automatically add it to the MAIL_LIST. I am trying to lookup and return data based on a field common in two files
File 1 ... (0 Replies)
Discussion started by: irishluck66
0 Replies
6. Shell Programming and Scripting
Hi,
Can i get some help from any of you guyz on writing Unix script.
my requirement is like reading a csv file, finding a specific pattern in the lines and repalce the string with new string and write it to another file.
My file is file ABC123.dat
Col1,Col2,Col3
102628,AB10 0,21... (2 Replies)
Discussion started by: prashant_jsw
2 Replies
7. Shell Programming and Scripting
hi all,
i am just getting in to bash scripting, so don't be too harsh...
i've created this little backup script, and it's just awfull... ugly, doesn't work like I want it to, the works. anyways, i was hoping some of you might help me improve it and learn a little in the process.
what i... (13 Replies)
Discussion started by: jmd9qs
13 Replies
8. Shell Programming and Scripting
Being linux administrator my task is to keep the machines up and running .Everyday i get a report of list of machines that are up and running.
it would be nice if i get list of machines that are shutdown in comparison to yesterdays report.
for example.If there are 5 machines in my environment... (5 Replies)
Discussion started by: pinga123
5 Replies
9. Shell Programming and Scripting
Hi Guys, I want to create a shell script to run multiple jobs in sequence.
Explaination -
If I were to run each jobs individually I would have gone to folder - "abin"(where my shellscript is place) as follows
cd abin
abin > runappeng.sh abc001
Now, I have list of programs which are like... (8 Replies)
Discussion started by: chaits84
8 Replies
10. Shell Programming and Scripting
Hi,
Newbie to Linux needing some help with scripting, here. I've written a script that allows easily shutting down, rebooting, or exiting to terminal mode via a Dialog menu after logging out of X-server. In my .bash_profile I have startx followed by running my script, shutdownmenu.sh, and it... (1 Reply)
Discussion started by: Pop45398
1 Replies
LEARN ABOUT DEBIAN
ftpshut
ftpshut(8) System Manager's Manual ftpshut(8)
NAME
ftpshut - shut down all proftpd servers at a given time
SYNOPSIS
ftpshut [ -R ] [ -l min ] [ -d min ] time [ warning-message ]
DESCRIPTION
The ftpshut command provides an automated shutdown procedure that a superuser can use to automagically disconnect current proftpd connec-
tions, and deny new connections. The command creates a control file as /etc/shutmsg to inform proftpd processes about an impending shut-
down.
OPTIONS
time The time at which the ftp servers will be brought down. It may be the word `now', indicating an immediate shutdown, or a future
time in one of two formats: +number or HHMM. The first form brings the servers down in number minutes, while the second form
indicates an exact time of day, using a 24-hour clock format.
-R Instructs ftpshut to remove the /etc/shutmsg file, restoring proftpd to its normal service. If this option is used, this will be
the only operation performed by ftpshut
-l min Specifies the number of minutes before shutdown that new ftp access will be disabled. If the -l option is not specified, a
default of 10 minutes (or immediately, if less than 10 minutes remains until shutdown) is used.
-d min Specifies the number of minutes before shutdown that existing ftp connections will be disconnected. If the -d option is not
specified, a default of 5 minutes (or immediately, if less than 5 minutes remains until shutdown) is used.
warning-message
Optionally provide a message which will be sent to new connections (if denied) and existing connections (when disconnected). The
message can contain the following magic cookies, which will be replaced as follows before being sent to new or existing connec-
tions:
%s time proftpd is being shut down
%r time new connections will be denied
%d time current connections will be dropped
%C current working directory (where applicable)
%L local host name (or virtualhost name)
%R remote host name
%T local time (format Thu Nov 15 17:12:42 1990)
%U username given at login time
CAVEATS
Proftpd servers can only be shutdown via ftpshut if a master daemon is running in standalone mode. Servers running in inetd mode will
honor the shutdown message file created by ftpshut, however currently running servers may be chroot(2)ed, and unable to read the shutdown
message control file.
It is possible to set an absolute shutdown time which is earlier than the current time. If this is the case, proftpd will not shutdown
until the indicated time on the following day.
FILES
/usr/sbin/ftpshut
/etc/shutmsg
AUTHORS
ProFTPD is written and maintained by a number of people, full credits can be found on http://www.proftpd.org/credits.html
SEE ALSO
inetd(8),ftp(1),proftpd(8),ftpwho(1),ftpcount(1)
Full documentation on ProFTPD, including configuration and FAQs, is available at http://www.proftpd.org/
For help/support, try the ProFTPD mailing lists, detailed on http://www.proftpd.org/lists.html
Report bugs at http://bugs.proftpd.org/
March 2003 ftpshut(8)