| Redirection: filters and pipes | |
|
|
2dos.homepage.dk/batutil/help/INDEX.HTM
boss.iele.polsl.gliwice.pl/public/Windows98/OldMSDOS/ home.freeuk.com/foxy2k/doszone/cmdref.htm : DOS Commands Reference www.computerhope.com/msdos.htm : MS-DOS Commands www.csulb.edu/~murdock/dosindex.html : DOS Command Index www.houlden.f9.co.uk/msdos/alphacomm.htm : Alphabetical Index www.helpfixmypc.com/dos.htm : DOS usage information www.microsoft.com/technet/archive/msdos/07_refer.mspx |
| DOS | Internal (in command.com) |
External (.com, .exe) |
||||
| ver | Command | Batch | Command | TSR* | Utility | |
| 1981 | 1 | copy, date, delete/del, dir, erase, rename/ren, time, type | pause, rem | chkdsk, comp, diskcomp, diskcopy, format, link, mode, sys | command | debug, edlin |
| 1982 | 1.1-2 | exe2bin | ||||
| 1983 | 2 | break, chdir/cd, cls, ctty, exit, mkdir/md, path, prompt, rmdir/rd, set, ver, verify, vol | echo, for, goto, if, shift | assign, backup, fc, find, more, recover, restore, sort, tree | graphics, print | fdisk |
| 1984 | 3 | attrib, graftabl, keybda, label, select | share | |||
| 1985 | 3.1 | join, subst | ||||
| 1986 | 3.2 | replace, xcopy | append | |||
| 1987 | 3.3 | chcp | call | keyb, nlsfunc | fastopen | |
| 1988 | 4 | mem | shellc, dosshell | |||
| 1991 | 5 | expand, loadfix, mirror, setver, undelete, unformat | doskey | edit, help, qbasic | ||
| 1993 | 6 | choice | deltree | dblspace, msav, vsafe | defrag, msd | |
* a TSR (Terminate and Stay Resident) program loads (resident) code into RAM memory - and terminates the loader part of the program.
Redirection, Pipes and Filters
Examples:
| dir > list.txt | redirect output from dir to the file list.txt - if the file does not exist, it is created - if the file exists, it is overwritten. |
|
| dir >> list.txt | redirect and append output from dir to the file list.txt - if the file does not exist, it is created - if the file exists, output is appended to end of file. |
|
| sort < names.txt > list.txt | use the file names.txt as input to sort - output from sort is sent to the file list.txt. |
|
| dir | sort | pipe output from dir to sort - output from sort is sent to standard output: the screen. |
|
| dir | sort > c:\temp\list.txt | - output from sort is sent to the file c:\temp\list.txt. | |
| dir | sort | more | - output from sort is piped to more - more (a filter) delivers output one screenfull at a time. |
Redirection and pipes may be used in batch files.