I have been working with web traces and i need to change a particular format of the web trace to another.
for example
from
cs21 793468639 122791 173 icons-html/HomePageIcon.gif ALT=" 0 0.0
cs21 793468639 122791 173 icons-html/HomePageIcon.gif ALT=" 0 0.0
cs21 793468639 122791 173 icons-html/HomePageIcon.gif ALT=" 0 0.0
to
cs21 793468639 122791 173 -unique id- 0 0.0
cs21 793468639 122791 173 -unique id- 0 0.0
cs21 793468639 122791 173 -unique id- 0 0.0
in each line, the 5th colume (which is a string) has to be converted to a unique-id (integer value).there are few thousands of such lines in the file (textfile).
how should i proceed to do this in shell script ?
Is there a way to do this ?
please help me out !
strings will repeat.so it should able to generate unique numbers to each string.