I have a very large file where say each line is made up of 80 characters.
I want to cut the characters from 20-30 and 50-60 from each line and then insert a delimiter between them (# or | etc).
eg
input file
000000000131.12.20990000590425246363375670011200140406
000000000131.12.20990000599116259067695570011200140306
000000000131.12.20990000954757586517205670011200140206
000000000131.12.20990001100136286779157070040749470106
000000000131.12.20990001100331729172935570040774630106
000000000131.12.20990001100417542814864770040736610106
000000000131.12.20990001100565052159608570040771070106
I can cut the relevant characters and put them in 2 files and then using cut paste option make a new file with the desired results. However this will take a long time as the file is huge. Is there a simpler way.
Please help.
I request you to pls elaborate on the code given. If my data is present in a file named a1, then how do i use your code to get a file a2 with the desired output. I could not figure out how to use the variables LHS and RHS to extract data from a line in a file.