I am new to this forum, I would like to do the following changes in one of the column of a txt file, which is having around 9 column.
For example, column 3 is having letters like this
AB11
AB12
C
CA
CB
AC1
AC2
I would like to convert the same column as follows
1AB1
2AB1
C
CA
CB
AC1
AC2
if it is having less than four letters, then the program need to introduce a space first and the the letter. If it is having four letters, then the program should bring the last number to the first place.
Need to do the conversion only in that particular column and the rest should be as such.
$> sed 's/^.\{1,3\}$/ &/g; s/^\([^ ]..\)\(.\)$/\2\1/g' infile
Thats cool, its working fine. But the input file i mentioned here, is having 9 columns and i need to change the above mentioned, only in the 3rd column.
Is there any other way to do this?
Expecting your replies and thanks in advance.
Regards
Fredrick.
---------- Post updated at 05:06 PM ---------- Previous update was at 04:55 PM ----------