🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #1036

Re: A batch programming contest for you

#1036
From: Jeff Epler
Date: Thu, 20 Aug 1992 00:51
57 lines
2661 bytes
In a previous article, yogi@cs.ubc.ca (Yossi Gil) says:

>ts@uwasa.fi (Timo Salmi) writes:
>
>>As you might know I have a large collection of batch files and
>>tricks garbo.uwasa.fi:/pc/ts/tsbat36.zip. I am always looking for
>>useful new information for it.
>
>Well, I have this other discovery that I try to offer every year
>or so, but it still remains unnoticed. I hope that you will add
>this to your tips&tricks so that I will not have to pound on this
>again in a year from now. 
>
>How to prevent ctrl-breaks during execution of autoexec.bat? 
>------------------------------------------------------------
>The "ctty nul" command is a well known trick, but it doesn't hold
>if the user types in ^C quickly. One usually puts "@echo off" at the
>beginning of the batch file. These leavs even more time to the
>intruding user to break. 
>
>My trick is to create
>	shell=command.com /p nul line in my config.sys file. This will
>make command.com start with the nul device as its standard
>input/output. It is undocumented, but worked in all of the many dos
>versions I have tried it on.
>
>And yet another relatively unknwon features of COMMAND.COM. Did you
>know that the following would work? Can you figure out what it will
>do?
>
>	<NUL> con ver 

Same as ver <nul >con, or just ver since it takes no input.
>
>as well as
>
>	<CON> nul vol 

Does nothing:  Sends the volume label to nul.  Dos has never been too
picky about where <, > redirections go..
>
>not mentioning
>
>	if not if == not shift else ; endif 

Shifts (I think else ; endif is ignored as an arguement to shift)
because if is not the same as not.
>
>These may prove useful to encrypt your batch files. 

Confused me for a bit.

-- 
|Jeff Epler               Additions Welcome           c(-8 ;-) >{8-) |
| :) (=( =-] (-= Celebrating the variety of faces =-> :^) {-= |-) (: |
| >X^P                                              Lincoln, Nebraska|
Technical Details
Message-ID: <1992Aug20.005148.7275@usenet.ins.cwru.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!mips!sdd.hp.com!swrinde!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!cleveland.Freenet.Edu!bx304
References: <1992Aug19.065119.10003@cs.ubc.ca> <1992Aug18.052017.3758@uwasa.fi>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!mips!sdd.hp.com!swrinde!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!cleveland.Freenet.Edu!bx304
From: bx304@cleveland.Freenet.Edu (Jeff Epler)
Newsgroups: comp.os.msdos.programmer
Subject: Re: A batch programming contest for you
Message-ID: <1992Aug20.005148.7275@usenet.ins.cwru.edu>
Date: 20 Aug 92 00:51:48 GMT
References: <1992Aug19.065119.10003@cs.ubc.ca> <1992Aug18.052017.3758@uwasa.fi>
Sender: news@usenet.ins.cwru.edu
Reply-To: bx304@cleveland.Freenet.Edu (Jeff Epler)
Organization: Case Western Reserve University, Cleveland, OH (USA)
Lines: 58
Nntp-Posting-Host: slc5.ins.cwru.edu