Article View: comp.os.msdos.programmer
Article #1004Re: A batch programming contest for you
From: Yossi Gil
Date: Wed, 19 Aug 1992 16:58
Date: Wed, 19 Aug 1992 16:58
68 lines
2368 bytes
2368 bytes
infidel+@pitt.edu (Todd J Derr) writes:
>In article <1992Aug18.213600.27969@cs.ubc.ca> yogi@cs.ubc.ca (Yossi Gil) writes:
>>
>>Don't know about useful, but interesting... Well, how about the self
>>printing batch program that I posted to alt.hackers some time ago:
>>
>>SELFPRNT.BAT:
>> Bad command or file name
>>
>>And yet another teaser: The above batch file doesn't self print
>>on 4DOS!
>well, it doesn't self-print with COMMAND.COM either... when you "List"
>it:
>C:>type selfprnt.bat
>Bad command or file name
>Bad command or file name
>...
>and when you execute it:
>C:>selfprnt
>C:>Bad command or file name
>Bad command or file name
>C:>Bad command or file name
>Bad commmand or file name
I believe there is a typo in the above: Only one of the two pairs
of lines shows up.
>close... but you are supposed to get *The Same* output if you "List" it
>or Execute it- and you don't.
Stricly speaking, the output is only one "Bad command or file name".
In fact, none of them are the output: one is the standard error
and the other is just an echo. But, otherwise if you wish to consider
the echo as output then I suppose you could always do
REM blah
Not mentioning the ultimate:
CTTY NUL
or even the more destructive
CTTY CLOCK$
>later,
>todd.
>--
>todd j. derr - the c.o.m.a. moderator! "i've got nothing to say but
>infidel+@pitt.edu (412) 363-9027 it's ok."
>infidel@pittunix (BIT) work: 648-1247
>if your mail bounces, send it to infidel@unix.cis.pitt.edu. thanks!
--
Joseph (Yossi) Gil {alberta,uw-beaver,uunet}!ubc-cs!yogi
Dept. of Computer Science yogi@cs.ubc.ca (cs.ubc.ca=137.82.8.5)
6356 Agricultural Road., Univ. of B.C., Tel: +1-604-822-8175
Vancouver, British Columbia, V6T 1Z2, Canada. Fax: +1-604-822-5485
Technical Details
Message-ID:
<1992Aug19.165833.21324@cs.ubc.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!gumby!destroyer!ubc-cs!yogiReferences:
<1992Aug18.052017.3758@uwasa.fi> <1992Aug18.213600.27969@cs.ubc.ca> <4941@blue.cis.pitt.edu.UUCP>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!gumby!destroyer!ubc-cs!yogi From: yogi@cs.ubc.ca (Yossi Gil) Subject: Re: A batch programming contest for you Message-ID: <1992Aug19.165833.21324@cs.ubc.ca> Sender: usenet@cs.ubc.ca (Usenet News) Organization: Computer Science, University of B.C., Vancouver, B.C., Canada References: <1992Aug18.052017.3758@uwasa.fi> <1992Aug18.213600.27969@cs.ubc.ca> <4941@blue.cis.pitt.edu.UUCP> Date: Wed, 19 Aug 92 16:58:33 GMT Lines: 68