🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Long command lines

#2197
From: Ralf Brown
Date: Thu, 20 Sep 1990 03:46
45 lines
3178 bytes
In article <1990Sep20.102811.9190@canterbury.ac.nz> phys169@canterbury.ac.nz writes:
}There can be a problem using the environment to store long command lines with
}conventional DOS: the environment space is small by default, and if you
}increase it in config.sys you have to choose a number large enough for any long
}command line you might need in the future, and this wastes space each time a
}program is nested. 

Not at all.  The only full-size environment is the master environment kept
by the shell.  Whenever a program is EXECed, the copy it gets has exactly
the used amount of memory allocated.  People have been bitten by that,
in fact....

}> cleaner to place the command line arguments after all the variables and
}> the terminating double null in C/Unix-fashion. After all, there is
}> already the program name (=argv[0]) there and the word preceeding it
}> contains 1, so it seems to be argc...
}(d) I'd like to see such a method become a standard, but this would really
}need replacing COMMAND.COM. The idea of placing them after the program name in
}the environemt would be good, so long as enough people (and alternative command
}interpreters) get together and agree on it. 

Actually, the place it would need to be implemented is in the EXEC DOS call,
since that is what builds the environment copy and adds the program name.
We would need all programs that call EXEC and want to pass a long command to
use a new subfunction that lets the calls specify a long command line
(wouldn't want to break the thousands of programs that use the existing EXEC
subfunctions...).  For backward compatibility, the PSP of the EXECed program
would still contain the first 126 bytes of the command tail.

}(j) improve the piping facilities a little, e.g. a tee facility and perhaps a
}special highly-buffered device driver for temporary files, and ">>", etc.

4DOS already has TEE and Y built in, but TEE is not nearly as useful under
MSDOS as it is under Unix (where you can use it to see the progress of a
long-running pipe).  Being single-tasking, all output from the previous pipe
stages will be accumulated and displayed at once with TEE.  For those not
using 4DOS, there are any number of TEE programs (trivial to write).

4DOS also has >&, >>&, >!, >>!, >&!, and >>&!.  It isn't DOS that limits
the redirection capabilities, it's COMMAND.COM....
-- 
{backbone}!cs.cmu.edu!ralf  ARPA: RALF@CS.CMU.EDU   FIDO: Ralf Brown 1:129/3.1
BITnet: RALF%CS.CMU.EDU@CMUCCVMA   AT&Tnet: (412)268-3053 (school)   FAX: ask
DISCLAIMER?  Did  | Everything is funny as long as it is happening to
I claim something?| someone else.  --Will Rogers
Technical Details
Message-ID: <10522@pt.cs.cmu.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!swrinde!ucsd!rutgers!rochester!pt.cs.cmu.edu!b.gp.cs.cmu.edu!ralf
References: <26da5df5@ralf> <7192@hydra.Helsinki.FI> <1990Sep20.102811.9190@canterbury.ac.nz>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!swrinde!ucsd!rutgers!rochester!pt.cs.cmu.edu!b.gp.cs.cmu.edu!ralf
From: ralf@b.gp.cs.cmu.edu (Ralf Brown)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Long command lines
Message-ID: <10522@pt.cs.cmu.edu>
Date: 20 Sep 90 03:46:32 GMT
References: <26da5df5@ralf> <7192@hydra.Helsinki.FI> <1990Sep20.102811.9190@canterbury.ac.nz>
Organization: Carnegie-Mellon University, CS/RI
Lines: 45