We are getting a fixed length file with "33" characters long. We are processing that file loading into DB.
Now some times we are getting a file with "35" characters long. In this case I have to remove two characters (in 22,23 positions) and process the file.
Here is the sample file. I need to remove "20" and process the remaining file.
Can you help achieving this task.I appreciate your help.
This is working fine. Thank you so much for helping me. I tried to understand the command.
If you don't mind can you help me understand what are we doing here in detail.
Thanks for the response.. "Sed" is working fine. I this this awk didn't work...
Anyways can you please explain me the above "awk" command ? I appreciate your help.
Everything in awk has the form condition{action} . If the condition evaluates to 1 then the action is performed. If the condition is omitted then the default condition is 1, so the action is always performed. If the action is omitted then the default action is performed, which is {print $0} . In this case the condition is "1" so that evaluates to 1 and the action is omitted, therefore {print $0 } is performed, which is "print the entire record".