Est. 1985 Beginner

Amiga Shellscript

The script language of AmigaDOS — inherited wholesale from Cambridge's TRIPOS in 1985, driven by EXECUTE and the dot directives, and still gaining features in AmigaOS 3.2 and AROS today.

Created by Martin Richards' TRIPOS command language, ported to the Motorola 68000 by Tim King at MetaComCo and shipped as AmigaDOS by Commodore-Amiga

Paradigm Procedural, Scripting (imperative command language with label-based control flow)
Typing Untyped (everything is a string; integers only through EVAL and the /N template modifier)
First Appeared 1985 (AmigaDOS 1.0, shipped with the Amiga 1000 on 23 July 1985)
Latest Version No independent version: the language ships with the host OS. AmigaOS 3.2.3 (Update 3, 2 April 2025) is the newest m68k release; the AROS reimplementation was still being changed in September 2026

Amiga Shellscript is the script language of AmigaDOS: the command language you type at an AmigaShell prompt, saved to a file and run with EXECUTE or by name. It is one of the very few 1980s home-computer shell languages that was not designed for its machine at all. It was lifted, almost verbatim, from TRIPOS — a portable research operating system written in BCPL at the University of Cambridge — and dropped into the Amiga in 1985 because Commodore’s own operating system project had run out of time. Forty-one years later, both of its surviving implementations are still being modified.

History and origins

TRIPOS (“Trivial Portable Operating System”, or, to Cambridge students, “Terribly Reliable, Incredibly Portable Operating System”) was begun in 1976 at the University of Cambridge Computer Laboratory under Martin Richards — the author of BCPL — and first appeared in January 1978 on a PDP-11. Work on a Motorola 68000 version started in 1981 at the University of Bath, and MetaComCo, a British 680x0 tools house, acquired the rights to it. Tim King had written that 68000 port and subsequently joined MetaComCo, which acquired the rights to the 68000 version and continued its development.

Meanwhile, Commodore’s in-house Amiga operating system, CAOS, was badly behind schedule. In March 1985 Commodore chose TRIPOS as the basis of the Amiga’s disk operating system, and MetaComCo won the contract precisely because TRIPOS gave a running head start on an impossible timescale. King got it onto prototype Amiga hardware and married the BCPL-based DOS layer to Carl Sassenrath’s Exec kernel and to Intuition. The Amiga 1000 was introduced on 23 July 1985.

How wholesale the transplant was is easy to see in the documentation. The DOS API, the command-line interface and its commands, the executable (“hunk”) format and the original file system were all essentially identical to TRIPOS, and the first AmigaDOS manual was close to the TRIPOS manual with the name substituted. TRIPOS’s command-file command was called C; on the Amiga it was renamed EXECUTE, and that rename is most of the difference between the two languages.

Design philosophy

The language has no design philosophy of its own, and that is its defining trait. It is a command-sequence facility: a file of lines that AmigaDOS feeds to the CLI “one at a time, just as though you had typed them at the keyboard,” with a preprocessing pass bolted on the front for parameter substitution. There are no functions, no data structures, no arithmetic in the grammar, and no expressions — EVAL exists because the language itself cannot add two numbers.

What it does have is a strikingly early and unusual take on script arguments. Substitution is not positional $1/$2 interpolation but a template:

.KEY name,greeting
.BRA {
.KET }
ECHO "{greeting$Hello}, {name$World}!"

A .KEY line declares the parameter names; <NAME> in the body is replaced by the value the caller supplied, and <NAME$DEFAULT> falls back to a default if the caller left it unset. (The example above has moved the brackets to { and } with .BRA and .KET.) Because the default separator is $ and the brackets are < and > — which collide with I/O redirection — the language lets you move its own syntax out of the way with .BRA, .KET, .DOLLAR and even .DOT, which changes the character that introduces directives. (BRA and KET are almost certainly borrowed from the bra–ket of Dirac notation.) Substitution only happens at all if the file’s first line begins with a dot command; otherwise AmigaDOS assumes there is nothing to scan and skips the preprocessing pass entirely.

The other quirk is control flow. Conditionals are commands, not syntax:

IF EXISTS Work/Prog
  TYPE Work/Prog
ELSE
  ECHO "It's not here"
ENDIF

IF tests the previous command’s return code (WARN, ERROR, FAIL — thresholds that FAILAT controls), string equality with EQ, or file existence with EXISTS, and NOT inverts any of them. Branching is SKIP to a LAB. Until the 1.3 release, SKIP could only jump forward, which meant the language had conditionals, subroutine-less error handling, and no loops whatsoever.

Key features

FeatureMechanism
Run a scriptEXECUTE script args, or set the s protection bit and type its name
Parameters.KEY template with <KEYWORD$DEFAULT> substitution
Syntax escape hatches.BRA, .KET, .DOLLAR, .DOT
Defaults and comments.DEF keyword value; a line of . followed by a space
ConditionalsIF / ELSE / ENDIF, nestable, with NOT, WARN, ERROR, FAIL, EQ, EXISTS
Branching and loopsSKIP label forward; SKIP label BACK from 1.3 onward
Failure policyFAILAT <n>, QUIT <rc>, WHY for the last error
VariablesSETENV/GETENV (global, files in ENV:); SET/GET/UNSET (shell-local) by 3.1
ArithmeticEVAL+ - * /, mod, shifts, and, or, xor, eqv, not, with decimal/hex/octal input
User interactionASK (sets WARN on yes), REQUESTCHOICE and REQUESTFILE for GUI dialogs
SpeedRESIDENT keeps EXECUTE and other pure commands in RAM instead of reloading them per invocation

Two things make the ordinary scripts pleasant to read. Commands advertise a ReadArgs template — Copy ? prints a template along the lines of FROM/M, TO/A, ALL/S, QUIET/S, the exact keywords varying by release — so argument handling is consistent system-wide and self-documenting. And AmigaDOS devices are just names, so a script can redirect to SPEAK: and have its output spoken, or (once AmiTCP arrived) to TCP:Site/Port and have it sent over the network.

Evolution

The language arrived finished and then changed in two bursts.

The first was the V1.3 Enhancer (manual copyright 1987; Workbench 1.3 shipped in 1988), which is where Amiga scripting became usable. The SHELL brought line editing, command history and ALIAS. A new s protection bit meant a script no longer needed the EXECUTE prefix — the Shell recognises the bit and runs the file as a script. SKIP ... BACK made loops possible for the first time (you can skip back as far as the last EXECUTE statement). EVAL added arithmetic, SETENV/GETENV added variables, RESIDENT addressed the cost of reloading EXECUTE from floppy on every script, and ICONX let a script live behind a Workbench icon. The 1.3 C: directory held sixty-four commands.

The second burst was AmigaOS 2.0 (1990, with the Amiga 3000), which rewrote AmigaDOS in C and, more importantly for scripters, integrated ARexx. From that point the Amiga had a proper scripting language with variables, functions and inter-process messaging, and the shell language settled into the role it kept: glue, boot-time configuration, and installation. AmigaOS 3.1 (1994) finished the vocabulary with shell-local variables and Intuition requesters; Haage & Partner’s 3.5 (1999) and 3.9 (2000) improved the Shell further.

Then, remarkably, a third burst thirty-six years after the first. Hyperion Entertainment’s AmigaOS 3.2 (14 May 2021) gave the language configurable TAB autocompletion, shell error redirection, HISTORY and EXECUTE as internal Shell commands, a debug variable that echoes executed commands to the serial port, and — genuinely new syntax — the && and || operators for conditional chaining. AmigaOS 3.2.3, released on 2 April 2025, is the current release for 68000-family Amigas.

Current relevance

The language is historical in the sense that nothing new is built on it, and thoroughly alive in the sense that all of its implementations are maintained. AmigaOS 3.2.x is a commercially sold, actively patched operating system for hardware that first shipped in 1985. AmigaOS 4.1 continues the line on PowerPC, where AmigaDOS finally abandoned its BCPL legacy entirely. MorphOS carries the same command set. AROS reimplements the shell in C from scratch, and its source tree shows commits on 13 and 14 September 2026 tightening the handling of .key numeric templates, .def defaults and the .pushis/.popis directives — a 2026 bug-fix to a command-file mechanism inherited from TRIPOS.

Anyone running an Amiga in emulation — WinUAE, FS-UAE, Amiberry — meets the language immediately, because the machine cannot boot without it: the first program that runs on a configured Amiga is a shell script.

Why it matters

Amiga Shellscript is a case study in how operating-system decisions calcify. A command language written for BCPL research machines in 1970s Cambridge became, by way of a rescue contract signed in March 1985, the thing millions of Amiga users typed at and the thing every Amiga executed at power-on. Its oddities — the .BRA/.KET escape hatches, the template-based arguments, the forward-only SKIP, the conditionals that are commands rather than syntax — are not Amiga design choices at all; they are TRIPOS fossils, preserved because backward compatibility mattered more than tidiness.

It also shows the limits of the “shell as programming language” idea. Commodore shipped a LISP-like Installer in 1992 to replace hand-written installation scripts, which were widely held to be too dangerous in this language, and bundled ARexx in 1990 for everything the shell could not express. The script language survived anyway, because the jobs it is actually good at — assign a name, copy a file, ask a question, branch on a return code, do it at boot — are jobs it has done reliably for four decades.

Timeline

1978
TRIPOS, begun in 1976 at the University of Cambridge Computer Laboratory under Martin Richards, first appears in January 1978. Its CLI includes ECHO, FAILAT, IF, LAB, QUIT, RUN, SKIP and WHY, and command files are run by a command called simply C - the direct ancestor of Amiga scripts. MetaComCo's May 1986 Introduction to Tripos documents C with the .KEY parameter template already in place
1985
Commodore chooses TRIPOS in March 1985 after its in-house CAOS operating system falls behind. Tim King, who had written the original 68000 port at the University of Bath and brought it to MetaComCo, adapts it onto the prototype Amiga hardware as AmigaDOS
1985
The Amiga 1000 is introduced on 23 July 1985 with AmigaOS 1.0. The script language arrives essentially complete from TRIPOS: EXECUTE (TRIPOS's C, renamed), IF/ELSE/ENDIF, SKIP/LAB, QUIT, FAILAT, ECHO, RUN and WHY, plus a boot script, S:Startup-Sequence, that every Amiga runs at power-on
1986
The AmigaDOS Manual (Bantam, February 1986) documents the dot directives in full - .KEY/.K, .DOT, .BRA, .KET, .DOLLAR/.DOL and .DEF - along with the rule that a file is only scanned for substitutions if its first line begins with a dot command. It also records the language's sharpest early limit: 'SKIP only jumps forward in the command sequence', so scripts cannot loop
1986
The new console handler (newconsole.handler, NEWCON:) introduced in release 1.2 replaces the original primitive handler; it is this console, stabilised across 1.2 and 1.3, that comes to be known as AmigaShell, adding command history, pipelines and automatic creation of a file when output is redirected. The Shell program proper - line editing, ALIAS and the script bit - does not arrive until 1.3
1988
The V1.3 Enhancer (manual copyright 1987, Workbench 1.3 shipping in 1988) is the largest single upgrade the language ever gets. It adds the SHELL itself - full line editing, a history capability and ALIAS - and a new script protection bit: 'Use the PROTECT command to set the script bit on a file. The SHELL will then execute that file as an EXECUTE script file instead of as a command.' SKIP gains a BACK option, so scripts can finally loop; EVAL brings integer arithmetic; SETENV and GETENV bring ENV: variables; RESIDENT lets EXECUTE itself be kept in RAM; and ICONX runs a script from a Workbench icon
1990
AmigaOS 2.0 ships with the Amiga 3000. AmigaDOS is rewritten in C, shedding the BCPL internals while keeping 1.x behaviour, and ARexx is integrated as the system scripting language - giving the Amiga a real programming language alongside the shell, and an inter-application message port that shell scripts could wait on with WaitForPort
1992
Commodore ships Installer, a LISP-like installation language from Sylvan Technical Arts, with AmigaOS 2.1. Hard-disk installs had until then been done with hand-written shell scripts; contemporary accounts attribute the move to a standardised, sandboxed installer to the damage such scripts could do to a user's system
1994
AmigaOS 3.1, Commodore's last release, rounds out the script vocabulary: SET, GET and UNSET for shell-local variables alongside SETENV/GETENV/UNSETENV, ALIAS and UNALIAS, and REQUESTCHOICE and REQUESTFILE so that a script can put up a real Intuition dialog and branch on the answer
1999
Haage & Partner take over with AmigaOS 3.5 (1999) and 3.9 (2000), whose changes include a more advanced CLI and Shell; these are later back-ported by Hyperion Entertainment into AmigaOS 3.1.4 in September 2018
2021
AmigaOS 3.2, released 14 May 2021 by Hyperion Entertainment, extends the shell language for the first time in decades: configurable TAB autocompletion, shell error redirection, HISTORY and EXECUTE as internal Shell commands, a debug variable that echoes executed commands to the serial port, and the operators && and || for conditional command chaining
2025
AmigaOS 3.2.3 (Update 3) arrives on 2 April 2025 with roughly two years of accumulated fixes and a new Kickstart 3.2.3 ROM, keeping the 1985 script language in supported, shipping condition on hardware down to the bare 68000
2026
The AROS shell is still being worked on: commits on 13 and 14 September 2026 refine signed .key /N values, .def replacement scope and mixed-case .pushis/.popis - forty-one years after the dot directives reached the Amiga

Notable Uses & Legacy

S:Startup-Sequence and S:User-Startup

Every Amiga boots by executing a shell script. Startup-Sequence allocates disk buffers, makes the ASSIGNs, loads Preferences and starts Workbench; because editing it can render a system unbootable, the documentation steers users to a separate User-Startup script for their own ASSIGNs, resident commands and auto-started programs

IconX - scripts as Workbench icons

ICONX, added in the 1.3 Enhancer, runs an AmigaDOS script from a double-clicked project icon: it changes directory to the script's own drawer, opens an I/O window sized by the icon's WINDOW tool type, and honours a DELAY tool type so the output stays readable. It is how shell scripts reached users who never opened a Shell

Software installation before Installer

Through the 1.x and early 2.x era, commercial Amiga software was installed by shipping an EXECUTE script on the distribution floppy that created drawers, copied files and edited the user's startup scripts. Commodore introduced the LISP-like Installer with AmigaOS 2.1 in 1992, a move generally attributed to the damage ad-hoc install scripts could do to users' systems

AmiTCP/IP network bring-up

AmiTCP/IP, the TCP/IP stack that put Amigas on the early-1990s internet, is configured by editing AmigaDOS scripts: users set their IP address and netmask in AmiTCP:bin/startnet, which starts the stack, waits on its ARexx-supplied WaitForPort for initialisation to finish, then configures interfaces and routes

AROS and MorphOS shells

The language outlived its vendor. AROS reimplements the shell from scratch in C - dot directives, EXECUTE semantics, IconX, Protect, Eval and RequestChoice included - and MorphOS carries the same command set forward, so AmigaDOS scripts written in the 1980s still run on modern hardware and emulators

Language Influence

Influenced By

TRIPOS

Running Today

Run examples using the official Docker image:

docker pull
Last updated: