Batch quine

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Exouxas
Posts: 34
Joined: 01 Sep 2011 12:52

Batch quine

#1 Post by Exouxas » 31 Jan 2013 11:47

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.

DigitalSnow
Posts: 20
Joined: 21 Dec 2012 13:36
Location: United States

Re: Batch quine

#2 Post by DigitalSnow » 31 Jan 2013 18:59

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.

spatters
Posts: 4
Joined: 25 Sep 2012 00:00

Re: Batch quine

#3 Post by spatters » 03 Oct 2013 14:55

I had previously brought up the issue but it went unanswered. Good answer.

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

Post Reply