I have a data file as follows:
111 11111111 sdfsdfsdfsdfsdf
111 11122222 sdfsdfsdfsdfsdf
111 11133333 sdfsdfsdfsdfsdf
2222 222233333 sdfsdfsdfsdfsdf
2222 222244444 sdfsdfsdfsdfsdf
3 311111 sdfsdfsdfsdfsdf
3 322222 sdfsdfsdfsdfsdf
I want to use a simple match of index to remove from field
2 the prefix which is also the same in field 1 and
then print the line such as
111 11111 sdfsdfsdfsdfsdfsdf
111 22222 sdfsdfsdfsdfsdfsdf
222 33333 sdfsdfsdfsdfsdfsdf
222 44444 sdfsdfsdfsdfsdfsdf
3 11111 sdfsdfsdfsdfsdfsdf
3 22222 sdfsdfsdfsdfsdfsdf
I've tried using finding the length of characters of field 1
and substracting same amount from the leading characters of
field 2, but have not accomplished yet.
Thanks for the help.
111 11111111 sdfsdfsdfsdfsdf
111 11122222 sdfsdfsdfsdfsdf
111 11133333 sdfsdfsdfsdfsdf
2222 222233333 sdfsdfsdfsdfsdf
2222 222244444 sdfsdfsdfsdfsdf
3 311111 sdfsdfsdfsdfsdf
3 322222 sdfsdfsdfsdfsdf
I want to use a simple match of index to remove from field
2 the prefix which is also the same in field 1 and
then print the line such as
111 11111 sdfsdfsdfsdfsdfsdf
111 22222 sdfsdfsdfsdfsdfsdf
222 33333 sdfsdfsdfsdfsdfsdf
222 44444 sdfsdfsdfsdfsdfsdf
3 11111 sdfsdfsdfsdfsdfsdf
3 22222 sdfsdfsdfsdfsdfsdf
I've tried using finding the length of characters of field 1
and substracting same amount from the leading characters of
field 2, but have not accomplished yet.
Thanks for the help.