1478
Comment: Because.
|
1480
... try just one category? I don't know why this doesn't work!
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= Bash quine = | |
Line 39: | Line 40: |
CategoryShell CategorySillyThings | CategorySillyThings |
Bash quine
A quine is a program that takes no input, and prints its own source code as output. Writing one is challenging in any language, and usually involves poking into the darkest, smelliest corners of the syntax.
If you've come across this page through some sort of wandering browsing, you might wish to stop reading after this introduction, and attempt to write a quine yourself. Reading the finished results here is not as educational as the struggle to write one. If on the other hand you've already struggled, either successfully or unsuccessfully, and would like to compare your results against someone else's, then read on.
Invalid quines
The classic shell approach would be something like
However, this is considered invalid, as it takes input from the file system.
The other classic shell approach would be the empty program. This one is considered to fail the spirit of the challenge, because it doesn't teach you much.
Valid quines
This first one is derived from the Java quine posted on the wikipedia page.
(May add more later if I figure them out.)