home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / question / 13628 < prev    next >
Encoding:
Internet Message Format  |  1992-11-19  |  1.0 KB

  1. Path: sparky!uunet!ornl!rsg1.er.usgs.gov!darwin.sura.net!lhc!adm!news
  2. From: hans@wizard.scania.se (Hans Johansson)
  3. Newsgroups: comp.unix.questions
  4. Subject: Character replacement in a ascii-file
  5. Message-ID: <34158@adm.brl.mil>
  6. Date: 19 Nov 92 16:16:02 GMT
  7. Sender: news@adm.brl.mil
  8. Lines: 20
  9.  
  10. Does anyone have a generic c-source for a program that can do character
  11. replacement in a file?
  12. My problem is to scan large ascii-files (several 10's of meg up to 100)
  13. for special hex-values (or octal or ascii) and replace them with others.
  14. The total number of different charcter values to look for is about 10 and
  15. relace them with other character values.
  16.  
  17. Please drop me a mail with source or a guide of the best way to do this.
  18. Have tried with 'tr', it works but rather slow.
  19.  
  20. Best Regards,
  21.  
  22.  
  23. ----
  24. Hans Johansson                                  Email: hans@scania.se
  25. Scania Data                                     Tel:   +46 8 553 81199
  26. Dept. SDP                                       Fax:   +46 8 553 85354
  27. S-151 87 SODERTALJE
  28. Sweden
  29.  
  30.