Hi,
I have an awk command that modifies the raw batch file.I would like to add a command to insert a unique sequencial number at the end of each line in the batch file. Does any one know how I can achieve it or what command I need to use?
Here is the awk command :
$awk '
1==NR {digits = substr($0,14,2)
point = "."}
{print substr($0,1,24) digits substr($0,25,29) point substr($0,54)} ' misc_interface.out > misc_interface.dat
The last field at the end of each line is 126th.I want to add 1,2,3, etc sequencial numbers after this field.
Thanks.
I have an awk command that modifies the raw batch file.I would like to add a command to insert a unique sequencial number at the end of each line in the batch file. Does any one know how I can achieve it or what command I need to use?
Here is the awk command :
$awk '
1==NR {digits = substr($0,14,2)
point = "."}
{print substr($0,1,24) digits substr($0,25,29) point substr($0,54)} ' misc_interface.out > misc_interface.dat
The last field at the end of each line is 126th.I want to add 1,2,3, etc sequencial numbers after this field.
Thanks.