![]() |
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 |
| Make variable length record a fixed length | jclanc8 | Shell Programming and Scripting | 3 | 10-03-2009 09:24 PM |
| get part of file with unique & non-unique string | andrewsc | Shell Programming and Scripting | 5 | 09-17-2009 04:43 PM |
| Unique batch and sequence creation | gehlnar | Shell Programming and Scripting | 3 | 02-04-2009 05:32 AM |
| ksh scripting: Extract 1 most recent record for unique key | OPTIMUS_prime | Shell Programming and Scripting | 2 | 10-31-2008 09:44 AM |
| Split a record ( in a row) and make it as new row | kottursamy | Shell Programming and Scripting | 2 | 08-12-2008 10:28 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Managing sequence to make unique record
Hi Everyone,
Using shell script i am getting final file as attached below. In this 4th column value should be unique using any sequence. for instance I've 1_13020_SSGM which is appearing 6 times in file and i should change it like 1_13020_SSGM_1,1_13020_SSGM_2,....1_13020_SSGM_6. Can someone please provide some idea on this? Input file 05112009,601,Excel,1_13020_DWS,1,999001 05112009,601,Excel,1_11020_SSGM,1,999001 05112009,601,Excel,1_13020_SSGM,1,999001 05112009,601,Excel,1_13020_SSGM,1,999001 05112009,601,Excel,1_13020_SSGM,1,999001 05112009,601,Excel,1_13020_SSGM,1,999001 05112009,601,Excel,1_13020_SSGM,1,999001 05112009,601,Excel,1_13020_SSGM,1,999001 05112009,601,Excel,1_13020_NEWE,1,999001 05112009,601,Excel,1_13020_NEWE,1,999001 05112009,601,Excel,1_13020_NEWE,1,999001 05112009,601,Excel,1_13020_NEWE,1,999001 05112009,601,Excel,1_13020_NEWE,1,999001 05112009,601,Excel,1_11020_NEWE,1,999001 05112009,601,Excel,1_11020_DWS,1,999001 05112009,601,Excel,1_11020_DWS,1,999001 05112009,601,Excel,1_11020_DWS,1,999001 05112009,601,Excel,1_11020_DWS,1,999001 Output file 05112009,601,Excel,1_13020_DWS_1,1,999001 05112009,601,Excel,1_11020_SSGM_1,1,999001 05112009,601,Excel,1_13020_SSGM_1,1,999001 05112009,601,Excel,1_13020_SSGM_2,1,999001 05112009,601,Excel,1_13020_SSGM_3,1,999001 05112009,601,Excel,1_13020_SSGM_4,1,999001 05112009,601,Excel,1_13020_SSGM_5,1,999001 05112009,601,Excel,1_13020_SSGM_6,1,999001 05112009,601,Excel,1_13020_NEWE_1,1,999001 05112009,601,Excel,1_13020_NEWE_2,1,999001 05112009,601,Excel,1_13020_NEWE_3,1,999001 05112009,601,Excel,1_13020_NEWE_4,1,999001 05112009,601,Excel,1_13020_NEWE_5,1,999001 05112009,601,Excel,1_11020_NEWE_1,1,999001 05112009,601,Excel,1_11020_DWS_1,1,999001 05112009,601,Excel,1_11020_DWS_2,1,999001 05112009,601,Excel,1_11020_DWS_3,1,999001 05112009,601,Excel,1_11020_DWS_4,1,999001 Thanks in advance. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|