Posted to tcl by Stu at Fri Jun 09 03:07:05 GMT 2023view raw

  1. One line each:
  2.  
  3. FileReader in.txt
  4. | FilterDoer ` tocalc {string toupper $value}
  5. | FilterDoer ` tocalc {regsub -all I $value A}
  6. | FileWriter out.txt ` configure -buffering full ` flush
  7.  
  8.  
  9. Or more structured-like:
  10.  
  11. FileReader in.txt
  12. | FilterDoer
  13. ` tocalc {string toupper $value}
  14. | FilterDoer
  15. ` tocalc {regsub -all I $value A}
  16. | FileWriter out.txt
  17. ` configure -buffering full
  18. ` flush
  19.