![]() |
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 |
| Reindex or re-increment last field of txt file. | silenthands | Shell Programming and Scripting | 2 | 11-08-2007 01:43 PM |
| Retrieve 5th Field to Last Field !! | jobbyjoseph | UNIX for Dummies Questions & Answers | 3 | 05-16-2007 03:20 AM |
| Moving Part of a field to another field using AWK | rjsha1 | Shell Programming and Scripting | 5 | 08-04-2006 05:39 AM |
| TTL field??? | solvman | UNIX for Advanced & Expert Users | 11 | 10-12-2001 12:54 AM |
| awk sub-field? | kristy | UNIX for Dummies Questions & Answers | 2 | 10-05-2001 04:07 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
add increment field when first field changes
Hi
I have a file that looks like the following: Name1 aaa bbbb Name1 ffd hhghg Name1 dffg ghhhh Name2 rtrt dfff Name2 rrtfr tgtt Name2 dsddf gfggf Name2 ffffg gfgf NAme3 fdff ghhgh Is it possible to format it so that a number increment field is added whenever the first field in a record changes. like that 1 Name1 aaa bbbb 1 Name1 ffd hhghg 1 Name1 dffg ghhhh 2 Name2 rtrt dfff 2 Name2 rrtfr tgtt 2 Name2 dsddf gfggf 2 Name2 ffffg gfgf Thanks |
|
||||
|
Thanks so much.
This works great. Appreciate your help |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|