in tcl, how do I replace a line in a file?

前端 未结 5 1345
执念已碎
执念已碎 2021-01-01 03:55

let\'s say I opened a file, then parsed it into lines. Then I use a loop:

foreach line $lines {}

inside the loop, for some lines, I want to

5条回答
  •  既然无缘
    2021-01-01 04:53

    If this is Linux it'd be easier to exec "sed -i" and let it do the work for you.

提交回复
热议问题