Tags:
create new tag
view all tags

Hints to copy a file

  • 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).
Topic revision: r1 - 2023-06-20 - cathybareiss
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback