help with script

Linux OS Topics
Post Reply
ghostrider_gr
Sergeant
Sergeant
Posts: 17
Joined: Mon Apr 19, 2010 1:01 am

help with script

Post by ghostrider_gr » Mon Apr 04, 2011 5:30 pm

well i need your help.. i have run many simlations and saved their results in files.. no i need to "take" certain statistics frow that files and copy them into an excel document so as to make some graphs.. cn anyone help me write a script to do this automatically and not manually cause i have 350 files.. for example i want frow every file, the number in line 35 and the number in line 45.. is it possible??

** in line 35 for example, i have:
total misses : 3500000 and i want to extract the number into a certain cell of an excel document...

thanks in advance..

***i am working on linux..
PS: i don't know if i posted it in the right category..
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: help with script

Post by Neo » Mon Apr 04, 2011 10:04 pm

If you are running this program on Windows, then you can use a language like VB.Net or C# to do this quiet easily. But since you are on Linux, I have no idea how to read/write Excel files without having libraries.

If you can run this program on Windows, then it can be easily found.
ghostrider_gr
Sergeant
Sergeant
Posts: 17
Joined: Mon Apr 19, 2010 1:01 am

Re: help with script

Post by ghostrider_gr » Tue Apr 05, 2011 12:27 am

i am on linux.. is there any way of copying the statistics i need in columns so as to copy/paste them in excel... i think it can be done with awc script but i do not knwo awk script at all..
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: help with script

Post by Neo » Tue Apr 05, 2011 1:40 am

me either. I worked out a similar job but that's on Windows long time ago. I'm sure doing this on Linux would be tricky.
awk seems to be a method but I can't tell you anything about it without knowing it.
ghostrider_gr
Sergeant
Sergeant
Posts: 17
Joined: Mon Apr 19, 2010 1:01 am

Re: help with script

Post by ghostrider_gr » Tue Apr 05, 2011 1:47 pm

Neo wrote:me either. I worked out a similar job but that's on Windows long time ago. I'm sure doing this on Linux would be tricky.
awk seems to be a method but I can't tell you anything about it without knowing it.
can you help me to do this on windows? i will copy my files and do it on windows... thanks!
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: help with script

Post by Neo » Tue Apr 05, 2011 3:18 pm

Refer these two examples written in VB6.

Read a file line by line using VB6

Write data to Excel file using VB6

Everything you need is there. All you have to do is mix it up and make what you want.
Ageek
Sergeant
Sergeant
Posts: 22
Joined: Sat Aug 01, 2009 10:54 am

Re: help with script

Post by Ageek » Sun Jun 19, 2011 5:52 pm

Hi,
You can write a shell script to output to a CSV (Coma Separated Value). Then you can easily process or even open with Excel and make it to column as u desired.

If u can give me a rough idea of your requirement, then i can help you.
Post Reply

Return to “Linux”