[comp.binaries.ibm.pc.d] ms-sh and command.com

kxb@math.ksu.edu (Karl Buck) (12/22/90)

I cannot seem to get the standard commands such as del, copy, etc to run
while in ms_sh. I've set comspec=command.com. What all needs to be to be done
to get these standard commands? Thanks.
--
 KSU Dept. of Mathematics               email: kxb@hilbert.math.ksu.edu 
 Manhattan, Kansas 66506                voice: (913)532-6750

solomon@chaos.utexas.edu (Thomas Solomon) (12/23/90)

In article <1990Dec21.231825.13788@maverick.ksu.ksu.edu> kxb@math.ksu.edu (Karl Buck) writes:
>I cannot seem to get the standard commands such as del, copy, etc to run
>while in ms_sh. I've set comspec=command.com. What all needs to be to be done
>to get these standard commands? Thanks.
>--

I had the same problems when I was setting up ms_sh on my pc.  The problem
here is with "internal" DOS commands that don't have an .exe or .com
file in the /DOS directory, such as del, copy, dir, etc.  You can run
these at any time by spawning a DOS shell with the appropriate command.
For example, to copy some files, you would type

     command /c copy [source files] [destination]

In practice, it becomes a pain to have to type "command /c" in front
of every internal DOS command that you want.  I have gotten around this
nuisance by defining "aliases" (actually these are shell variables)
for the internal DOS commands.  For example, type

     copy='command /c copy'

After typing this, the shell variable $copy will behave just like the
normal DOS copy command.  Just type

     $copy [source] [destination]

(and don't forget the $).  I put these 'aliases' in my profile.sh
so that they will always be there.

Hope this helps.

                               Tom Solomon
                               solomon@chaos.utexas.edu

williams@umaxc.weeg.uiowa.edu (Kent Williams) (12/23/90)

Don't forget that ms_sh does functions, so you can, for instance,

cls() { command /c cls }

and then cls to your heart's content.  RTPGM (read the pretty good manual).







--
             Kent Williams --- williams@umaxc.weeg.uiowa.edu 
"'Is this heaven?' --- 'No, this is Iowa'" - from the movie "Field of Dreams"
"This isn't heaven, ... this is Cleveland" - Harry Allard, in "The Stupids Die"