\begin{patch}{TextFileXmpPagePatch1}
\begin{paste}{TextFileXmpPageFull1}{TextFileXmpPageEmpty1}
\pastebutton{TextFileXmpPageFull1}{\hidepaste}
\tab{5}\spadcommand{f1: TextFile := open("/etc/group", "input")\bound{f1 }}
\indentrel{3}\begin{verbatim}
   (1)  "/etc/group"
                                         Type: TextFile
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{TextFileXmpPageEmpty1}
\begin{paste}{TextFileXmpPageEmpty1}{TextFileXmpPagePatch1}
\pastebutton{TextFileXmpPageEmpty1}{\showpaste}
\tab{5}\spadcommand{f1: TextFile := open("/etc/group", "input")\bound{f1 }}
\end{paste}\end{patch}

\begin{patch}{TextFileXmpPagePatch2}
\begin{paste}{TextFileXmpPageFull2}{TextFileXmpPageEmpty2}
\pastebutton{TextFileXmpPageFull2}{\hidepaste}
\tab{5}\spadcommand{f2: TextFile := open("/tmp/MOTD", "output")\bound{f2 }}
\indentrel{3}\begin{verbatim}
   (2)  "/tmp/MOTD"
                                         Type: TextFile
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{TextFileXmpPageEmpty2}
\begin{paste}{TextFileXmpPageEmpty2}{TextFileXmpPagePatch2}
\pastebutton{TextFileXmpPageEmpty2}{\showpaste}
\tab{5}\spadcommand{f2: TextFile := open("/tmp/MOTD", "output")\bound{f2 }}
\end{paste}\end{patch}

\begin{patch}{TextFileXmpPagePatch3}
\begin{paste}{TextFileXmpPageFull3}{TextFileXmpPageEmpty3}
\pastebutton{TextFileXmpPageFull3}{\hidepaste}
\tab{5}\spadcommand{l := readLine! f1\free{f1 }\bound{l }}
\indentrel{3}\begin{verbatim}
   (3)  "root:x:0:"
                                           Type: String
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{TextFileXmpPageEmpty3}
\begin{paste}{TextFileXmpPageEmpty3}{TextFileXmpPagePatch3}
\pastebutton{TextFileXmpPageEmpty3}{\showpaste}
\tab{5}\spadcommand{l := readLine! f1\free{f1 }\bound{l }}
\end{paste}\end{patch}

\begin{patch}{TextFileXmpPagePatch4}
\begin{paste}{TextFileXmpPageFull4}{TextFileXmpPageEmpty4}
\pastebutton{TextFileXmpPageFull4}{\hidepaste}
\tab{5}\spadcommand{writeLine!(f2, upperCase l)\free{f2 l }}
\indentrel{3}\begin{verbatim}
   (4)  "ROOT:X:0:"
                                           Type: String
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{TextFileXmpPageEmpty4}
\begin{paste}{TextFileXmpPageEmpty4}{TextFileXmpPagePatch4}
\pastebutton{TextFileXmpPageEmpty4}{\showpaste}
\tab{5}\spadcommand{writeLine!(f2, upperCase l)\free{f2 l }}
\end{paste}\end{patch}

\begin{patch}{TextFileXmpPagePatch5}
\begin{paste}{TextFileXmpPageFull5}{TextFileXmpPageEmpty5}
\pastebutton{TextFileXmpPageFull5}{\hidepaste}
\tab{5}\spadcommand{while not endOfFile? f1 repeat
    s := readLine! f1
    writeLine!(f2, upperCase s)
\free{f1 f2 }\bound{Copied }}
\indentrel{3}\begin{verbatim}
                                             Type: Void
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{TextFileXmpPageEmpty5}
\begin{paste}{TextFileXmpPageEmpty5}{TextFileXmpPagePatch5}
\pastebutton{TextFileXmpPageEmpty5}{\showpaste}
\tab{5}\spadcommand{while not endOfFile? f1 repeat
    s := readLine! f1
    writeLine!(f2, upperCase s)
\free{f1 f2 }\bound{Copied }}
\end{paste}\end{patch}

\begin{patch}{TextFileXmpPagePatch6}
\begin{paste}{TextFileXmpPageFull6}{TextFileXmpPageEmpty6}
\pastebutton{TextFileXmpPageFull6}{\hidepaste}
\tab{5}\spadcommand{close! f1\free{Copied }\bound{closed1 }}
\indentrel{3}\begin{verbatim}
   (6)  "/etc/group"
                                         Type: TextFile
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{TextFileXmpPageEmpty6}
\begin{paste}{TextFileXmpPageEmpty6}{TextFileXmpPagePatch6}
\pastebutton{TextFileXmpPageEmpty6}{\showpaste}
\tab{5}\spadcommand{close! f1\free{Copied }\bound{closed1 }}
\end{paste}\end{patch}

\begin{patch}{TextFileXmpPagePatch7}
\begin{paste}{TextFileXmpPageFull7}{TextFileXmpPageEmpty7}
\pastebutton{TextFileXmpPageFull7}{\hidepaste}
\tab{5}\spadcommand{write!(f2, "-The-")\free{Copied }\bound{tthhee }}
\indentrel{3}\begin{verbatim}
   (7)  "-The-"
                                           Type: String
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{TextFileXmpPageEmpty7}
\begin{paste}{TextFileXmpPageEmpty7}{TextFileXmpPagePatch7}
\pastebutton{TextFileXmpPageEmpty7}{\showpaste}
\tab{5}\spadcommand{write!(f2, "-The-")\free{Copied }\bound{tthhee }}
\end{paste}\end{patch}

\begin{patch}{TextFileXmpPagePatch8}
\begin{paste}{TextFileXmpPageFull8}{TextFileXmpPageEmpty8}
\pastebutton{TextFileXmpPageFull8}{\hidepaste}
\tab{5}\spadcommand{write!(f2, "-End-")\free{tthhee }\bound{eenndd }}
\indentrel{3}\begin{verbatim}
   (8)  "-End-"
                                           Type: String
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{TextFileXmpPageEmpty8}
\begin{paste}{TextFileXmpPageEmpty8}{TextFileXmpPagePatch8}
\pastebutton{TextFileXmpPageEmpty8}{\showpaste}
\tab{5}\spadcommand{write!(f2, "-End-")\free{tthhee }\bound{eenndd }}
\end{paste}\end{patch}

\begin{patch}{TextFileXmpPagePatch9}
\begin{paste}{TextFileXmpPageFull9}{TextFileXmpPageEmpty9}
\pastebutton{TextFileXmpPageFull9}{\hidepaste}
\tab{5}\spadcommand{writeLine! f2\free{eenndd }\bound{LastLine }}
\indentrel{3}\begin{verbatim}
   (9)  ""
                                           Type: String
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{TextFileXmpPageEmpty9}
\begin{paste}{TextFileXmpPageEmpty9}{TextFileXmpPagePatch9}
\pastebutton{TextFileXmpPageEmpty9}{\showpaste}
\tab{5}\spadcommand{writeLine! f2\free{eenndd }\bound{LastLine }}
\end{paste}\end{patch}

\begin{patch}{TextFileXmpPagePatch10}
\begin{paste}{TextFileXmpPageFull10}{TextFileXmpPageEmpty10}
\pastebutton{TextFileXmpPageFull10}{\hidepaste}
\tab{5}\spadcommand{close! f2\free{LastLine }\bound{closed2 }}
\indentrel{3}\begin{verbatim}
   (10)  "/tmp/MOTD"
                                         Type: TextFile
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{TextFileXmpPageEmpty10}
\begin{paste}{TextFileXmpPageEmpty10}{TextFileXmpPagePatch10}
\pastebutton{TextFileXmpPageEmpty10}{\showpaste}
\tab{5}\spadcommand{close! f2\free{LastLine }\bound{closed2 }}
\end{paste}\end{patch}

\begin{patch}{TextFileXmpPagePatch11}
\begin{paste}{TextFileXmpPageFull11}{TextFileXmpPageEmpty11}
\pastebutton{TextFileXmpPageFull11}{\hidepaste}
\tab{5}\spadcommand{)system rm /tmp/MOTD\free{closed2 }}
\indentrel{3}\begin{verbatim}
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{TextFileXmpPageEmpty11}
\begin{paste}{TextFileXmpPageEmpty11}{TextFileXmpPagePatch11}
\pastebutton{TextFileXmpPageEmpty11}{\showpaste}
\tab{5}\spadcommand{)system rm /tmp/MOTD\free{closed2 }}
\end{paste}\end{patch}

