Results 1 to 4 of 4
Hi Everyone
I need some help with a script urgently please.
We have some output files from our windows mail server which we need consolidate into one file by extracting ...
- 03-19-2008 #1Just Joined!
- Join Date
- Feb 2008
- Posts
- 5
Script to extract data in excel format?
Hi Everyone
I need some help with a script urgently please.
We have some output files from our windows mail server which we need consolidate into one file by extracting certain data.
basically what we have:
- we have quite a couple of directories (named after email domains) each with a single output file
- I need to write a script to go into each directory, grep the file inside for specific data and output these into one big output file.
this is all good and well as I can do this and output the data but I have one issue though which I am not sure on how to do and I hope someone can assist urgently.
What we need to do is , the output from each directorie's file (each file will contain about 4 lines of output that I need to extract) needs to be placed into a delimited file in order to import this into excell so that we can send this off to business.
Can anyone perhaps assist me by explaining how I can do this.....
so basically I need to go into a directory grep for 'criteria1', output to file, add delimiter, grep for 'criteria2', add delimiter etc... when that directory is done I need to start a new line, go into the next directory and repeat the grep process.
Anyone have an idea?
thank you

- 03-19-2008 #2Linux User
- Join Date
- Jun 2007
- Posts
- 458
Excel files are encrypted in Windows binary format. I wonder if anyone can extract using an SH script.
"When you have nothing to say, say nothing."
- 03-19-2008 #3Just Joined!
- Join Date
- Feb 2008
- Posts
- 5
Well I dont need to extract from excell though, I need to put the files into a flatfile (txt) and then ftp to a windows achine and import into excel.
- 03-19-2008 #4Just Joined!
- Join Date
- Feb 2008
- Posts
- 5
I also need to add a check for each grep to put in a blank field if the specific criteria line is not found as not all files will have a subject line for instance


Reply With Quote