Find & Replace

I get a text file with 70+ columns (seperated by Tab) and about 10000 rows. The 58th Column is all numbers. But sometimes 58th columns has "/xxx=##" after the numeric data. I want to truncate this string using the script. Any Ideas...:confused:

You could use sed to strip that string out of the lines that have it.

Thanks, but the problem is bigger. The string "/xxx=##" exists at many other columns too. Even the string along with the numeric data in 58th column exists at many other places.

e.g. I have row one A B C, row two B A C, row three A A A. And I need to change it to row one A B C, row two B D C, row three A D A. That is where ever there is A in Column two replace with D, leave rest as is.

Use "cut" to split the file into three pieces with the middle piece being the column you want to modify. Then modify it. Then use "paste" to reassemble the three pieces back to a single file.