1 2 3 4 5
\newwrite\x \immediate\openout\x = xfoo.out \immediate\write\x{hello} \immediate\closeout\x \bye