![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to view the contents of .gz file without extracting the file? | amitkhiare | Shell Programming and Scripting | 10 | 12-18-2008 05:59 AM |
| Extracting data from text file based on configuration set in config file | suparnbector | Shell Programming and Scripting | 3 | 08-10-2007 03:25 AM |
| extracting XML file using sed | pujansrt | Shell Programming and Scripting | 7 | 06-29-2007 02:18 PM |
| [Splitting file] Extracting group of segments from one file to others | ozgurgul | Shell Programming and Scripting | 1 | 09-14-2006 01:17 PM |
| extracting from a tar file | Reza Nazarian | UNIX for Dummies Questions & Answers | 4 | 03-24-2006 05:54 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Extracting from file
Hi I have the file in following format
Begining of file --------------------------------------- my name some dfgfgfk jdksjdkls laladsl sdlsdls . . . kfdjkfdk some drt pro vhdl sdjls. ---------------------------------------------------------------- ddr.spw.df.df 0 0 0 0 0 ddr.ser.ddf.tp 1 2 3 4 1 ddr.pwq.pro.fgt.tp 1 3 4 5 7 eth.pro.iw 1 2 3 4 5 eth.3po.lk 1 2 5 6 7 eth.3yu.lo 3 4 5 6 9 -------------------------------------------------------- end of file Now I want to seprate all lines begining with ddr and sum their 5th column, similiarly I want to seprate all lines begining with eth and sum their 5th column. The top portion of file as shown might consist of some paragraph which I don't need to consider. So please can anyone help with perl script to perform this operation. Thanks |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|