Quine: A program that produces its own source code as output. (Wiktionary)
This ed(1) script, when run through ed
with no file, will print its own source code.
$ ed < quine.ed
The filename of the script is not important. The script does not even have to be in a file.
$ ed < quine.ed > quine.out
$ diff quine.ed quine.out
The diff
should produce no output and exit with success (0).
MIT. See the LICENSE file for details.