Page 1 of 1

Batch quine

Posted: 31 Jan 2013 11:47
by Exouxas
So I was reading here on DosTips that a quine returned the script itself, and that the smallest know quine was like 100+ bytes.

After reading that, I made this:

Code: Select all

@echo off&type %0%&pause

(24 Bytes)

Is this considered a quine?
Seems quite simple.

Re: Batch quine

Posted: 31 Jan 2013 18:59
by DigitalSnow
Of course Wikipedia has a good outline of a quine. http://en.wikipedia.org/wiki/Quine_(computing)
See the following quote:
However quines cannot receive any form of input, including reading a file. Which means the following shell script is not a quine.

So unfortunately, according to the general rules, your script is not a quine because it take in input by reading itself.

Re: Batch quine

Posted: 03 Oct 2013 14:55
by spatters
I had previously brought up the issue but it went unanswered. Good answer.

viewtopic.php?f=3&t=3802&p=20333&hilit=quine#p20333