Hints to copy a file

20 Jun 2023 - 16:12 | Version 1 |
  • The basic idea:
    • open one file for reading and the other for writing
    • while not at the end of file of the input file
      • read the current line from the input file
      • write it to the output file
    • close both files
  • To change a given line
    • add a counter to your loop
    • if it is not the line you want, continue as normal
    • if it is the line you want, write the change (but don't forget to count this line).
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
This website is using cookies. More info. That's Fine