On Sat, 1 Feb 2003, Wouter van Ooijen wrote: *>> Dear Sir. *>> I am a new beginner in c language, and I have a problem as follow: *>> I have a file (f1.txt) with data for example: *> *>Sorry sir, this sounds too much like homework assignment to me. Yeah. Why not give a hint that works (but not in C): sed -e 's/111/1/g' -e 's/000/0/g' Peter -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads