Earlier quoted context omitted.
Just to be a smartarse ;): cat output.txt some input EOF
Maybe I'm missing it, but this doesn't seem applicable to what my sponge program (and joeyh's) are intended to do: to modify a file "in-place". joeyh's example: sed "s/root/toor/" /etc/passwd | grep -v joey | sponge /etc/passwd My example: sort
EDIT -- after tinkering around with the console, I see. I'm wiping the file out by writing to it (>) before it's finished reading (<). Neat, TIL!