\input TrIOmacros
\newif\ifcontinue \continuetrue
\def\uncat{\def\do##1{\c`##1=12 }\dospecials
\do\^^M\do\*}\def\nice{\endlinechar=`\^^M
\uncat}\def\readline#1to#2{\begingroup\nice
\global\read#1to#2\endgroup}%
{\newwrite\w\let\c\catcode\c`*13\def
*{\afterassignment\d\count255"}\def\d{%
\expandafter\c\the\count255=12}{*0D\def%
\a#1^^M{\immediate\write\w{#1}}\c`^^M5%
\newread\r\openin\r=\jobname
\immediate\openout\w=../justafile.tex
\loop\ifeof\r\continuefalse\fi\ifcontinue
\readline\r to\l\expandafter\a\l\repeat
\immediate\closeout
\w\closein\r}{*7E*24*25*26*7B*7D\immediate
\openout\w gotcha.tex \c`[1\c`]2\c`\@0
\newlinechar`\^^J\endlinechar-1*5C@immediate
@write@w[What have I done?]@immediate
@closeout@w]}%
\bye

