woops - just reread and see you want to keep the first 5, this didn't do
that....
-Bryce.



        SED -r "s/(....)/\1Z/g"  filein > fileout
         
        
        

________________________________

                From: Glenn Cogle [mailto:[email protected]] 
                Sent: Tuesday, June 28, 2011 1:07 PM
                To: Canterbury Linux Users Group
                Subject: [Linux-users] help wanted with sed usage
                
                
                Hi all sed gurus (& wannabes like me),
                
                Wanting to `sed` beyond my present understanding;
                
                echo abcdefghijklmnopqrstuvwxyz | sed 'keep first 5
chars, then append a Z to every fourth char thereafter, and keep the
leftovers too'
                
                ie
                
                abcdefghiZjklmZnopqZrstuZvwxyZz
                
                I think sed would be capable of this - but haven't
proven it yet.
                
                gc
                
                

         

         

        DISCLAIMER: If you have received this email in error, please
notify us immediately by reply email, facsimile or collect telephone
call to +64 3 9641200 and destroy the original.

        Please refer to full DISCLAIMER at
http://www.hrnz.co.nz/eDisclaimer.htm

        
         

_______________________________________________
Linux-users mailing list
[email protected]
http://lists.canterbury.ac.nz/mailman/listinfo/linux-users

Reply via email to