Article View: comp.sys.ibm.pc
Article #40177DOS's Hidden UN*X-like Behavior
From: Sam Lin
Date: Sat, 23 Dec 1989 02:41
Date: Sat, 23 Dec 1989 02:41
78 lines
2975 bytes
2975 bytes
I have been experimenting with trying to make DOS 3.1 more UN*X-like, because
it is a real pain switching between UN*X and DOS between my Sun and my PC.
Recently, I got a hold of PICNIX3 from grape.ecs.clarkson.edu, and playing
with the SWITCHAR command has yielded some interesting discoveries.
When I use "SWITCHAR -" change the DOS switch character to '-', as one would
expect, the command
dir /w
becomes
dir -w.
However, I discovered that the path separator also gets transformed from the
brain-damaged '\' to the UN*X '/'!!
Thus, if there is a directory called c:\tmp, typing
dir c:/tmp
works just as well as
dir c:\tmp.
Even more interesting, '/' now must be used as the path separator in the
invokation of programs. '\' no longer works! Thus to invoke the
program \util\emacs.exe, I have to type:
/util/emacs.
Typing
\util\emacs
results in "EXEC failure." Usually use the "prompt [$p]" command to make
my DOS prompt display the current directory. Strangely, even though DOS
now recognizes '/' as the path separator, it still uses the '\' in
displaying the prompt. For instance, if I am in the directory
\kermit on drive c, I get the prompt:
[C:\KERMIT]
However, if I invoke a new copy of COMMAND.COM by typing
/command
my prompt looks like this:
[C:/KERMIT]
But if I cd into a sub-subdirectory by typing, say
cd /wp/word
my prompt looks like:
[C:/wp\word]
Anyway, here are my questions:
1. Why does DOS get confused, and mix the '/' and '\' path separators?
Does anybody know of any patches to COMMAND.COM which can correct this?
2. Is there any way to make the DOS prompt display the '/' path separator
without starting a new copy of COMMAND.COM?
3. Does COMMAND.COM have any undocumented command-line switches that
control this UN*X-like behavior?
----------------------------------------------------------------------
Sam C. Lin | ///
Internet: linco@eng.umd.edu | ///
----------------------------- /// /// ///|| /// /////// ////////
/// /// /// ||/// /// /// ///
/// /// /// |/// /////// ////////
///
//////////
-----------------------------------------------------------------------
Technical Details
Message-ID:
<1989Dec23.024131.6399@eng.umd.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!purdue!haven!mimsy!mojo!eng.umd.edu!lincoShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!purdue!haven!mimsy!mojo!eng.umd.edu!linco From: linco@eng.umd.edu (Sam Lin) Newsgroups: comp.sys.ibm.pc,comp.binaries.ibm.pc.d Subject: DOS's Hidden UN*X-like Behavior Message-ID: <1989Dec23.024131.6399@eng.umd.edu> Date: 23 Dec 89 02:41:31 GMT Sender: news@eng.umd.edu (The News System) Reply-To: linco@eng.umd.edu (Sam Lin) Distribution: usa Organization: Merriversity of Uniland, College Purgatory Lines: 78