10-06-2008
Shell scripting Program
Hi all,
I am new comers to this forums. I need one help from urs.
My requirement is to fetch the records from the log file for every 15 mins and write the datas to the new file...
The log file which is located in the 21/09/2008 directory.
In 21/09/2008 directory, number of log files are there.
so every log file contains differnet information respect to the process details.
The log file looks like below:
start time: 22:00
End time :24:00
Process name: abcd
Start date: 21/09/2008
Elapse time: 120mins
when user give these Input parameters are :
Date: sysdate(or any date which user likes)
I want to execute the query automatically every 15 mins.
I want to write the data in the current directory from which we ran the script in the format of .xls file
The output file looks when i give the input parameters date:21/09/2008
it will search all the files which is located in the 21/09/2008 directory and read into the .xls file
process name start date elapse time start time end time
abcd 21/09/2008 120mins 22:00 24:00
start time: 22:00
End time :24:00
Process name: abcd
Start date: 21/09/2008
Elapse time: 120mins
please asssit me how to do that...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies
2. Shell Programming and Scripting
Hi all,
I am new to this forums. I need one help from urs.
My requirement is to fetch the records from the log file for every 15 mins and write the datas to the new file...
The log file which is located in the 21/09/2008 directory.
In 21/09/2008 directory, number of log files are... (1 Reply)
Discussion started by: balaji23_d
1 Replies
3. Shell Programming and Scripting
Hi,
I have one script program (lod0361.job) ,where i am using errorlog() function with some arguments like below.
call errorlog ("---- unload to \"TESTNAME.out\" select * from TESTNAME")
but when i run the lod0361.job then i am getting below errors.
call errorlog ("---- load from... (1 Reply)
Discussion started by: deepakagrawal13
1 Replies
4. Shell Programming and Scripting
Hi
How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies
5. What is on Your Mind?
Gents,
I have been working in a Solaris/Unix environment for about 9 months. I took some linux classses online before getting the job. But, I am not very good at scripting. I want to learn how to script. Do you think that I should start with Shell scripting or Perl? I wanted to continue with... (2 Replies)
Discussion started by: Pouchie1
2 Replies
6. Web Development
i am going to study any one of the scripting languages mentioned above(shell 0r perl scripting) . Which is having more scope for a fresher? (1 Reply)
Discussion started by: Anna Hussie
1 Replies
7. Shell Programming and Scripting
Hello,
I'm looking to script the basic instant messaging program we have in my company, it's called "oi", it's working as follow:
# oi $user
then we have to launch it...
after finding the system of the user it's asking for the message...
then on a new line we have to hit ctrl+d
I... (2 Replies)
Discussion started by: nomadvisuals
2 Replies
8. Shell Programming and Scripting
So right now I am trying to sync an iPhoto Library file from multiple computers.
The goal being that it takes the most recently updated file (depending on which computer it was). Currently I am using Google Drive to essentially sync the newest library, however, I was curious to see if this was... (1 Reply)
Discussion started by: abudis
1 Replies
9. Shell Programming and Scripting
Hi ,
I have written a shell script to call a java program say load_id.sh .This sh script indeed is executed implicitly in other sh script which calls 2 more sh scripts one by one. I need to check if the load_id.sh (which calls java program) is executed successfully only then continue with... (1 Reply)
Discussion started by: preema
1 Replies
10. Homework & Coursework Questions
#! /bin/bash
# program to creat a backup copy for every deleted file or dierctores
mv -t /home/$USER/.local/share/Trash/files $1
rsync -a /home/$USER/.local/share/Trash/files /usr/share/trash
didn't work (2 Replies)
Discussion started by: rami-ali
2 Replies
srg(1) General Commands Manual srg(1)
NAME
srg - A fast and flexible log analyser for the Squid proxy
SYNOPSIS
srg srg [options] <logfile> [logfile] ...
DESCRIPTION
SRG is a log analyser for the Squid web proxy. SRG takes input in the form of Squid access logs and outputs a series of reports in PHP (or
HTML) format designed to summarise what the users of the cache have been viewing. SRG supports grouping requests by user, subnet or IP and
can also filter on the same criteria.
OPTIONS
-C <config file>
Location of the srg config file.
-d Enable debugging output
-f <date>[time]
Start time to begin analysation at
--help -h
Display this help
-H Generate HTML rather than PHP reports
-m <days>
Specify maximum number of days to keep a report
-M Output a summary report suitable for emailing.
-o <directory>
Output Directory
-O <URL>
URL where reports will be located
-t <date>[time]
End time to stop analysation at
-v Verbose mode. Print relevant messages.
-V Print Version and exit.
Date and time should be specified in the following format for -f and -t
Date: YYYY-MM-DD
Time: :HH:MM:SS - note leading :
eg. 2005-01-08:15:46:30 (Jan 8 2005 15:46:30)
Logfile(s) to process should be specified at the end of the options
AUTHOR
SRG is written and maintained by Matt Brown <matt@crc.net.nz> with the help of many others. See AUTHORS in the top level of the source
tree.
BUGS
Of course SRG doesn't have any bugs *wink*, if by some obscure chance you happen to find a bug in SRG, please report it via the URL below
http://sourceforge.net/tracker/?func=add&group_id=62787&atid=501794
srg(1)