Skip to main content
54 votes
Accepted

How does the command.com shell work with MS-DOS?

Traditionally, operating shells are relatively independent of the operating system’s function and the operating system can operate without a shell. Most shells have two modes of operation, interactive ...
Stephen Kitt's user avatar
51 votes

Why did 8-bit computers choose BASIC dialects as "de facto" command-line interface, instead of contemporary Shell/Lisp dialects?

People nowadays think of BASIC as something lesser and generally tied to puny microcomputers, but BASIC was the language of choice for many scientific, engineering and business computers in the 1970s. ...
Raffzahn's user avatar
  • 226k
43 votes

Why was 'echo on' chosen as the default setting within batch scripts in MS-DOS?

ECHO ON was chosen as the default setting when interpreting batch files to preserve backwards compatibility. In PC-DOS 1.0, COMMAND.COM displayed each command as it interpreted it, and this couldn’t ...
Stephen Kitt's user avatar
32 votes
Accepted

What led to the fall of shell accounts?

There were probably many reasons, but I can think of these: Misuse/abuse. When I had shell access to systems (with my private TCP/IP provider, or later in uni) in the mid 1990's, there was a constant ...
AnoE's user avatar
  • 1,569
30 votes

when did command line applications start using "-h" as a "standard" way to print "help"?

TL;DR Never It is common, but far from universal. For example, the ls command to this day does not have -h for help. -h is for "human readable" with only --help for help. My hunch is that ...
manassehkatz-Moving 2 Codidact's user avatar
29 votes
Accepted

How many lines of code were in the first Unix version (with the Thompson shell)?

According to the Unix history repository, V1 had 4,501 lines of assembly code for its kernel, initialisation and shell. Of those, 3,976 account for the kernel, and 374 for the shell. For comparison, ...
Stephen Kitt's user avatar
29 votes
Accepted

How did Multics make library calls available as shell commands?

Yes. All external entry points in compiled "segments" (← Multics for "files") were exposed as names in the file system. Very strange by today's standards but that's what they did....
davidbak's user avatar
  • 6,344
29 votes

What led to the fall of shell accounts?

The two most significant reasons were: Direct TCP/IP access via dialup SLIP and PPP protocols (and later via broadband connections to homes and offices) eliminated the need to access the Internet ...
Sotto Voce's user avatar
27 votes

What was the first OS with the type-ahead capability from a dumb terminal?

MS-DOS did not have a type-ahead feature, because that function was provided by the BIOS. A typical PC BIOS had a 15 or 16 character typeahead buffer, where keystrokes would be queued until something (...
Greg Hewgill's user avatar
  • 7,009
23 votes

Was there an autocomplete utility in MS-DOS?

Microsoft didn’t provide anything like this for MS-DOS, but there are a number of third-party tools which can add auto-completion to the shell (along with other command-line editing features). A ...
Stephen Kitt's user avatar
23 votes

Why does -z and -n exist in most shells and /bin/test?

Because $foo may itself start with a hyphen and look like an option or an operation, which would cause misinterpretation of the command line. Using -z or -n guarantees that no matter the contents of $...
Leo B.'s user avatar
  • 19.4k
21 votes
Accepted

Why did 8-bit computers choose BASIC dialects as "de facto" command-line interface, instead of contemporary Shell/Lisp dialects?

If we're not talking about BASIC as a programming language, but the operational commands that surround it, then the answer is that they surely reimplemented the command structure of existing ...
dave's user avatar
  • 35.9k
19 votes

Why did 8-bit computers choose BASIC dialects as "de facto" command-line interface, instead of contemporary Shell/Lisp dialects?

This was more of a marketing question than a technical one. The historical fact is that most vendors of 8-bit personal computers chose to include BASIC. The simple answer as to why they made this ...
Brian H's user avatar
  • 60.8k
19 votes

How did Multics make library calls available as shell commands?

Commands in Multics were functions, not standalone programs. So, the command: delete myfile was the same as: call delete( "myfile" ); in PL/I. In practice, this was rather troublesome. ...
John Doty's user avatar
  • 2,849
19 votes

when did command line applications start using "-h" as a "standard" way to print "help"?

I am interested to hear about the history because I have a prominent command line product that has decided to use -h for something that does not print a help message. -h being help was never formally ...
Raffzahn's user avatar
  • 226k
18 votes

Why is the 'echo' command called 'echo'?

TL;DR: It's about the viewpoint these functions were designed. Command line is all about interaction Programming is about deferred execution As a result command/statement names were picked to ...
Raffzahn's user avatar
  • 226k
18 votes
Accepted

Why was 'echo on' chosen as the default setting within batch scripts in MS-DOS?

Great stuff on the the MS/PC-DOS and CP/M history in the other answers. I'd add that batch files come from the heritage (in early DOS, CP/M, and on mainframes and other systems) of script files, ...
Houska's user avatar
  • 296
17 votes

How can I create a pipe for stdin/stdout of command.com (or 4dos.com) in C or a batch file?

It seams as if you imply that DOS is kind of an unixoide OS, which it isn't. While Microsoft's goal with MS-DOS 2.0 was to move it toward Unix like operations, for compatibility with Xenix, it never ...
Raffzahn's user avatar
  • 226k
17 votes
Accepted

How can I create a pipe for stdin/stdout of command.com (or 4dos.com) in C or a batch file?

MS-DOS doesn't support pipes like Unix does - It does support input and output redirection through its command line processor COMMAND.COM, but that's a different thing. If you're fine with pure I/O ...
tofro's user avatar
  • 35.2k
14 votes

Why was 'echo on' chosen as the default setting within batch scripts in MS-DOS?

The choice for the default is between seeing what's going on and not seeing what's going on. Specifically, should each command line of a batch file be shown as it's executed or not. It seems ...
TonyM's user avatar
  • 4,267
14 votes

Using only one terminal, can I interrupt a process that's hung on very early Unix versions?

Yes, you should be able to interrupt a running process using the interrupt key. In Unix v6, the default interrupt key (intr) is ^?, aka DELETE, aka RUBOUT (ASCII 127). Also, the default character-...
Ken Gober's user avatar
  • 11.4k
13 votes
Accepted

Does ancient UNIX create a new shell process for each terminal?

Each terminal gets its own set of processes: first getty, which sets the terminal link up and waits for a login, then replaces itself with login to handle the actual login, and finally login runs the ...
Stephen Kitt's user avatar
12 votes
Accepted

Is it true that "do ... done" blocks in Bash do not end with "od" because od existed before Bash/Bourne shell?

Yes, certainly. the method of bracketing control structures used in the Bourne Shell was ripped straight from Algol 68, in which loop “bodies” were enclosed between do and od. This is a quote about it ...
texdr.aft's user avatar
  • 3,627
11 votes

Why does -z and -n exist in most shells and /bin/test?

The argument from consistency: The majority of test commands are of the form -flag value. For example, test -e foo.bar - does file foo.bar exist? test -n "$VAR" fits into that model, and is ...
dave's user avatar
  • 35.9k
11 votes

What was the first OS with the type-ahead capability from a dumb terminal?

Type-ahead was originally not an operating-system function, but rather a function of a terminal controller that was separate from the CPU and might have either a dedicated buffering subsystem for each ...
supercat's user avatar
  • 37.2k
9 votes
Accepted

Amiga ed removes flags

I can reproduce the same behavior on my A2500 with Workbench 2.1 and using the built-in AmigaDOS "Ed" command v2.00. The critical bit is the Delete ("d") protection flag. Ed's internal functionality ...
Brian H's user avatar
  • 60.8k
9 votes

What was the first OS with the type-ahead capability from a dumb terminal?

First? Don't know, but from personal knowledge TOPS-10 had it, around 1974, in the 5-series monitor. Probably before that, but I wasn't using it. A 1989 course on TOPS-10 internals, while way too ...
dave's user avatar
  • 35.9k
7 votes
Accepted

How do specify drives to mount when Amiga 1200 starts up

Each partition on an Amiga hard drive has settings that determine whether it is bootable and whether it should be auto-mounted. It sounds like your DH3 partition is not set for auto-mounting, and the ...
Brian H's user avatar
  • 60.8k
7 votes
Accepted

DOS/4DOS Prompt with animated characters?

Yes, it is possible. With 4DOS at least. It involved running a BTM from within the printing of the prompt that in a loop displayed the animation(s) and waited for a keypress, upon which the normal ...
JdeBP's user avatar
  • 2,288
7 votes

Why did 8-bit computers choose BASIC dialects as "de facto" command-line interface, instead of contemporary Shell/Lisp dialects?

I see 3 main reasons: The 8-bit computers were targetting amateur computer enthusiasts, and a lot of beginner children. BASIC were specific to each machine to allow easy access to keyboard, sound and ...
Jean-François Fabre's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible