SH script, 812 8 7
Store a file with
sed p $0*
in its own, empty directory and run from this directory using sh [file]
or set executable.
Old alternative with 8 characters, but doesn't need its own directory. Store a file with
sed p<$0p $0
and run using sh [file]
or set executable.
Old alternative with 12 characters12 characters:
sed -i- p $0
This will actually output to the program file itself, but where to output was not specified. Replicates itself at an exponential rate.