|
how do you want to change the numbers? you to through each line and seperate the "row#" from the actual number pretty easy with gawk by setting the field seperator to ": "
gawk -F ": " -v OFS=": " '{print $1,$2}' textfile.txt
this tells gawk that the field seperator for each record (each line) is a colon and a space. the -F option sets the input field seperator. -v tells gawk that a variable is going to be set, in this case OFS (output feild seperator).
this line will just print out the textfile.txt. if you wanted to change the number to the line number you would use
gawk -F ": " -v OFS=": " '{print $1,NR}' textfile.txt
otherwise you'll have to do some decision making on how to change the second field, and insert it into the $2 slot.
hope this helps a little
|