I want to replace a column(first and last) having an alphanumeric value in a file.
Requirement :
1)All values in a Column must be unique and contain an incremented pattern HCTV0096 for first column and cafefeca0090 for last column
2)for uniquely identifying each value in column Numeric part must be incremented by 1 for both column
Output must be :
I have tried, and got below only for first column
but it gives :
Kindly help me with this..:)
Requirement :
1)All values in a Column must be unique and contain an incremented pattern HCTV0096 for first column and cafefeca0090 for last column
2)for uniquely identifying each value in column Numeric part must be incremented by 1 for both column
Output must be :
Code:
HDTV0092|Subcenre B| Sa_WSDSD |bocvdf| caddfdfefeca0090
HDTV0093|Subcenre B| Sa_WSDSD |bocvdf| caddfdfefeca0091
HDTV0094|Subcenre B| Sa_WSDSD |bocvdf| caddfdfefeca0092
HDTV0095|Subcenre B| Sa_WSDSD |bocvdf| caddfdfefeca0093
:
:
Code:
awk -F '|' '{print "HDTV"$1+1,$0}' file1
Code:
HDTV1 HDTV0092|Subcenre B| Sa_WSDSD |bocvis|caddfdfefeca0090
HDTV1 HDTV0093|Subcenre B| Sa_WSDSD |bocvdf| caddfdfefeca0091
HDTV1 HDTV0094|Subcenre B| Sa_WSDSD |bocvdf| caddfdfefeca0092
HDTV1 HDTV0095|Subcenre B| Sa_WSDSD |bocvdf| caddfdfefeca0093