SHELL

by (Login MCalkins)
Moderator

For the most part, SHELL is a way of accessing the command line shell program. In the case of QBASIC, DOS's COMMAND.COM. In the case of QB64, I would guess Windows's CMD.EXE.

COMMAND.COM and CMD.EXE have very similar commands, but they are not identical. Learn to use the command line, and then you will know how to use shell.

The command line shells implement "internal commands" like copy, cd, rd, md, rename, etc... There are also "external commands", which are really just external programs, like attrib and DOS's deltree.

Be advised that concepts like cut and paste are dependent on a clipboard. File management from the command line doesn't use a clipboard. Instead, you specify a source and destination.

In most cases, you can use the "/?" switch with a command to find out what it does. For example, typing "copy /?" will tell you the syntax for the copy command. Typing "help" can give you a list of some of the commands in Windows. For the DOS commands, you can get the "Help" program from:

ftp://ftp.microsoft.com/Products/Windows/Windows95/CDRomExtras/OtherUtilities/olddos.exe

which contains QBASIC, Help, and other DOS utilities.

Keep in mind that the Windows command prompt supports long file names, and spaces in the file names. It will often be necessary to use quotation marks around filenames and URLs.

The "<", ">", and ">>" are redirection commands. They redirect stdin or stdout. "|" is used to pipe the stdout of one program into the stdin of another. For example, "ipconfig /all|more" pipes the output of ipconfig to the input of more, which breaks it up into screen fulls.

Regards,
Michael

Posted on Jun 19, 2011, 1:30 AM

Respond to this message   

Return to Index