The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 08-07-2007
akdwivedi akdwivedi is offline
Registered User
 

Join Date: Aug 2007
Posts: 8
How to insert at a particular position in flat file

Hi All,
I have a flat file with ~ as de-limiter (e.g: aaa~ba a~caa~0~d~e)
What I want is check if the 4th character is 0 and replace it with say 4. So now it becomes : aaa~ba a~caa~4~d~e.

I have to do this for the whole file, but the delimiter position remains the same, not the character length.

Please help.
Abhi.
Reply With Quote
Remove advertisements
!!
Forum Sponsor