Script to Extract time from log files and write to a excel


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Script to Extract time from log files and write to a excel
# 1  
Old 06-06-2008
Script to Extract time from log files and write to a excel

Can someone help me with writing a unix script for following requirement

1) I have a log file in which we have start time and end time (format: hh:mm:ss)
Example: starting script on Thu Jun 5 20:50:52
---------
Thu Jun 5 21:55:33 - Script Completed

2) I want to extract start time and end time of the script (ex: 20:50:52 and 21:55:33) from the log file (on unix server) and write into a excel file (in a shared drive).

3) I need to collect these start and end times every day and write into the excel (this excel will be stored in a shared drive) and also I have around 50 logs which i need to go thru to get the start and end times.

4) Once the start and end times are extracted into excel file, I need to get the time taken for completion of the script (by substracting end time from start time) and populate the result value into another cell of the excel.
For example, My ouput should look like this.
Start Time End Time Time to Complete
19:41:42 20:25:18 00:43:36

Your help with this script is greatly appriciated.

Thanks,
S
# 2  
Old 06-06-2008
Tell us what have you tried so far, we should be able to help you
# 3  
Old 06-06-2008
You can write into Excel files using a Perl module.
# 4  
Old 06-06-2008
does anyone have a sample script with which i start up ... ??
# 5  
Old 06-09-2008
can someone help me start with this?

appreciate your help ...
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Write two csv files into one excel with multiple sheets

I have requirement to write two CSV files to one single excel with multiple sheets. Data present in the two files should sit in excel as different sheets. How can we achieve this using shell script? 1.csv 2. csv 1,2,3,4 5,6,7,8 XXXXX YYYYY Res.excel 1.csv data... (1 Reply)
Discussion started by: duplicate
1 Replies

2. Shell Programming and Scripting

Perl script to Merge contents of 2 different excel files in a single excel file

All, I have an excel sheet Excel1.xls that has some entries. I have one more excel sheet Excel2.xls that has entries only in those cells which are blank in Excel1.xls These may be in different workbooks. They are totally independent made by 2 different users. I have placed them in a... (1 Reply)
Discussion started by: Anamika08
1 Replies

3. Shell Programming and Scripting

How to write text file data to excel using UNIX shell script?

Hi All, I have the requirement in unix shell script. I want to write the "ls -ltr" command out put to excel file as below. Input :text file data : drwxr-xr-x 5 root root 4096 Oct 2 12:26 drwxr-xr-x 2 apx aim 4096 Nov 29 18:40 drwxr-xr-x 5 root root 4096 Oct 2 12:26 drwxr-xr-x... (10 Replies)
Discussion started by: Balasankar
10 Replies

4. Shell Programming and Scripting

Need help to write a script for moving the log files to some other folder

Hi Experts, I want to write a script, based upon the following requirement 1) I am having 5 application $ cd logs $ ls -l drwxr-xr-x 2 natraj nat 5.0K Sep 20 10:25 one drwxr-xr-x 2 natraj nat 5.0K Sep 20 10:39 two drwxr-xr-x 2 natraj nat 1.5K Sep 20 10:58... (4 Replies)
Discussion started by: natraj005
4 Replies

5. Shell Programming and Scripting

Extract data with awk and write to several files

Hi! I have one file with data that looks like this: 1 data data data data 2 data data data data 3 data data data data . . . 1 data data data data 2 data data data data 3 data data data data . . . I would like to have awk to write each block to a separate file, like this: 1... (3 Replies)
Discussion started by: LinWin
3 Replies

6. UNIX for Dummies Questions & Answers

Write a script to extract information from a db

Hi I need to put together a script that will search certain tables in a db and send that data to a csv file. Basically I am importing data to a db and I want to write a script to check that all information was imported correctly. Thank you (1 Reply)
Discussion started by: ladyAnne
1 Replies

7. Shell Programming and Scripting

shell script to remove old files and write to a log file

Hi, I have a script that works on a unix box but am trying to get it working on a linux box that uses shell. I am not a programmer so this is proving harder than I imagined. I made some changes and ended up with the script below but when I run it I get the following messages. Any help would be... (4 Replies)
Discussion started by: yabai
4 Replies

8. Shell Programming and Scripting

Script to Extract time from log files and write to a excel

Can someone help me with writing a unix script for following requirement 1) I have a log file in which we have start time and end time (format: hh:mm:ss) Example: starting script on Thu Jun 5 20:50:52 Thu Jun 5 21:55:33 - Script Completed 2) I want to extract start time and end time of... (0 Replies)
Discussion started by: santosham
0 Replies

9. UNIX for Advanced & Expert Users

Script to Extract time from log files and write to a excel

Can someone help me with writing a unix script for following requirement 1) I have a log file in which we have start time and end time (format: hh:mm:ss) Example: starting script on Thu Jun 5 20:50:52 Thu Jun 5 21:55:33 - Script Completed 2) I want to extract start time and end time of... (0 Replies)
Discussion started by: santosham
0 Replies

10. Shell Programming and Scripting

Pls Help-Script to execute Commands and write to excel file

Execute some commands in script and store result in excel sheet Kindly help me........... (1 Reply)
Discussion started by: Computer_baby
1 Replies
Login or Register to Ask a Question