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 the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-26-2009
padhu.47 padhu.47 is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 4
Post URGENT:- Data Scrubbing

Hi All,

I have a Flatfile (any delimitation) of millions of lines of data, where in i have to scrubb the data of the line from the position ($1 ) given in input parameter until the length ($2) given in the input parameter. I utilised awk , sed but i am unable to do it.

scrub key - 12345 should be replaced by 67890
eg: 01289 - before scrubbing
06789 - after scrubbing


example : sample.ksh 6 4



Input - Flatfile:
-------
"1234,5678,0987,12345667,000000976655,+1234,013994878356"
"0987,23467,11243554,0000887651,1234567,09876,1234455"
"0987675,1223443,797784784784,09866545,+232322,097865"

I want the output as scrubbed file as below:

"1234,0678,0987,12345667,000000976655,+1234,013994878356"
"0987,78967,11243554,0000887651,1234567,09876,1234455"
"0987675,6778443,797784784784,09866545,+232322,097865"