![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| extract a line from a file using the line number | grandtheftander | Shell Programming and Scripting | 7 | 01-22-2009 10:24 AM |
| AWK - if last line/record do something | PacificWonder | Shell Programming and Scripting | 3 | 06-06-2008 12:13 AM |
| Extract a line from a file using the line number | zambo | Shell Programming and Scripting | 1 | 05-01-2008 02:39 PM |
| Using sed to extract Nth record? | doubleminus | UNIX for Dummies Questions & Answers | 3 | 04-19-2008 11:18 AM |
| How to extract duplicate records with associated header record | run_eim | UNIX for Dummies Questions & Answers | 17 | 01-16-2007 11:46 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
extract specific data from file and insert into new file.
Hi all!!
After experiencing great helpfulness the last time I posted a problem at this site, I once again turn to the forum for expert help. The problem: I have a file.dat containing x, y, and z coordinates, like: x y z 1 1 4 1 2 3 1 3 9 2 1 7 2 2 2 2 3 8 3 1 3 3 2 5 3 3 7 .....and so on. I would like to extract the maximum z value with its respective x value from each data block and insert these values into a filenew.dat: Example: file.dat 1 1 9 #extract this 1 2 3 1 3 2 2 1 7 2 2 2 2 3 8 #extract this 3 1 3 3 2 7 #extract this 3 3 5 and insert into.... filenew.dat 1 9 2 8 3 7 Already greatful for previous assistance, I humbly ask: Could anybody help me with this? Regards bjorb |
|
|||||
|
maybe you should try to use awk ? i'm sorry , i haven't programmed using awk for a long time but this is a little tutorial about awk.
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|