![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Help please awk or cut
Hi I'm new to unix programming so struggling with something thats probably simple to many of you
I have data files of the format : ID, date, value1, value2, blank on each line either value1 or value2 will be zero. I need my output file to contain ID, date, non-zero value The input and output filenames need to be the same (extension can possibly be different). The ID is of variable length. I've tried using cut and if to identify the non-zero field and have also played with summing value1 and value2 (if one is always zero then the result is correct). I've spent today trying to learn awk and have come up with a few wrong answers, can anybody help please Thanks in anticipation |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|