This page is "".

Shell Manual



%S	- Current directory
%D	- The last component of the current directory
%d	- The last two path components of the current directory
%N	- Process number

\e	- ESC
\n	- newline
\r	- carriage return
\t	- TAB
\a	- BEL

^*	- ctrl-character * (e.g. ^@ NUL, ^g BEL)
e.g. set prompt "%N. \\e[42;33m%d\\e[0m » "

Default prompt is "%N.%S» ", in case the prompt-variable is not set.

Internal commands

Usage: alias [«alias name» [«alias contents»]]

Display or create aliases. Without arguments alias displays all aliases and their definitions. With one argument the corresponding alias is displayed. With two arguments a new alias is created.

e.g. alias cp copy

Usage: assign [«name:» [ ( [REMOVE] | directory [(LATE | ADD)] ) ] ]

Displays, creates or deletes assigns (logical names pointing to files or directories). Assign without any arguments displays all assigns. With the LATE option you can do a late-binding assign which is resolved only when the assign is first accessed. When using ADD the directory is added to the assign list (the previous directory is preserved). Currently multiassigns are not used, but they are there..

e.g. assign foo: rom:testdir

Usage: avail

Displays free memory.

Usage: cd [«directory»]

Change the working directory to the specified directory. The directory needs to have execute-permissions.

Usage: chmod [ugo][+-=][hsparwed] «files»

Change the permission bits of files and/or directories.

	ugo	- group of bits to change (user, group, others)
		  default is user
	=+-	- toggle (=), set (+) or clear (-) bits
	rwed	- Read, Write, Execute and Delete flags
	hspa	- Hidden, Script, Pure and Archive flags
These groups can be repeated any number of times to produce the desired results.

e.g. chmod +rwed-ago-rwed myfile

Will set user RWED for "myfile" and simultaneously remove the Archive flag and RWED bits for group and other users.

The resulting masks are applied to the original protection bits in the order: toggle, set and clear. You can get some pretty confusing results if you toggle, set and clear the same bit. You will notice that the bit will always get cleared in this case, because the clear mask is applied last. The cause for this is simple: it is only necessary to calculate the three mask values once and they can be applied to each file that comes along. If you want to be sure you get what you mean, group the changes in the command line in the same order (toggle, set, clear).

«files» can be any number and combination of files and directories. CHMOD will echo the file names and resulting file permissions to the standard error stream.

Usage: copy «file» «newfile»

Copies files. File comments and protections are copied, but you own the new file.

Usage: echo [-n] [«words»] [NOLINE]

Writes all arguments to the standard output without commenting whether they are correct or not. If the first parameter is "-n" or the last one is "NOLINE", no newline is appended. ("-n" is case-sensitive, "NOLINE" is not)

e.g. echo "World is flat." "Earth orbits the sun!"

Usage: filenote «files» «filenote»

Change the comment field of files and/or directories. «files» can be any number and combination of files and directories.

Usage: format «disk:»

Format a disk. Only the owner of a disk can format it. Also, the handler must know about the action.

Usage: info

Show information about mounted disks and other handlers. Disk name, size, usage and block size is displayed.

Usage: internal

Lists all internal commands.

Usage: login «uid» [«gid»]

Change the owner of the shell. Obviously this command will be removed and a login procedure with passwords added later..

Usage: ls [-d] [«files»]

Show the contents of directories. With the -d option you get the info about the directory itself, not just about its contents.

Usage: mkdir «names»

Creates directories. Mkdir will only create new directories in existing directories. You need to have write permissions in the parent directory.

Usage: path [«directories» | RESET]

Displays, adds to or resets the command search path. Without any arguments path displays the directories in the search path.

Usage: rehash

Will search the path and update the command-completion cache.

Rehash should be run after path changes so that the commandname completion will work correctly. If rehash is not run on shell startup, it is run automatically when the command-completion (or command-completion listing) is first used. Path changes do not automatically invalidate the cached data.

Usage: relabel «disk:» «newname»

Sets a new logical name for a disk.

Usage: rename «oldname» «newname»

Renames files. Currently does not work across devices, but you can move a file or directory to anywhere inside the same device.

Usage: reset

Resets BOAR by disallowing interrupts for too long. Obviously this command will also be removed in the future.

Usage: rm «files»

Deletes one or more files or directories. You can only delete the ones that have delete permissions, are not in use and, in the case of directories, are empty.

Usage: send «file»

Send a file. Use ^V in the terminal program to receive it.

Usage: set [ «varname» [ «definition» ] ]

Display or set variables (local, but inherited). Without any arguments all variables are displayed. With one argument only that variable is displayed and with two arguments the variable is set.

Usage: top

Displays tasks/processes running/waiting in the system. Press any key to end the display.

Usage: type «files» [HEX]

Displays the files specified. If the HEX option is specified, will display the files in hexadecimal format.

Usage: unalias «aliases»

Removes one or more aliases.

Usage: unset «variables»

Removes one or more variables.

Usage: which «commands»

Show which version of command is executed.

The output may list one or more of these:

After this the path is searched and the paths of the matching commands are displayed.

«commands» can be any number of command names (wildcard expressions are not currently handled).

Command search order

All commands with absolute or relative paths are found directly (or maybe not) and executed. If the path points to a directory, auto-cd-operation is performed. If no path is specified, the command is searched in the following order:

  1. Shell internal command (list with "internal")
  2. Resident command
  3. Resident command with ".b68k" added to the name
  4. Executable or script file in the current working directory
  5. Directory in the current working directory
  6. Executable or script file in path

Command Line Editing

The Shell line editing is only used on interactive devices. The command line editor has two modes depending on the 'term' environmental variable (vt100 or ANSI). In ANSI-mode it sends more bytes, so vt100-mode is recommended. Just make sure that your emulation matches the setting. It seems that most vt100-terminals really don't like to work with the ansi-mode. A 'dumb' mode is also available, but it really throws characters at you and is dead slow on all important editing commands :-) The editor knows about these commands:

left/right ^B/^F	Moves cursor left and right
up/down    ^P/^N	Recalls history events
^A			Goto the start of line
^E			Goto the end of line
Backspace		Delete previous character
Delete			Delete current (next) character
^D			Like Delete or display matching
			files/commands if cursor is at EOL
^L, ^R			Refresh line
^K			Delete to the end of line
^U			Delete to the start of line
^W			Delete previous word
^X			Delete line
^Y			Yank killed text back

TAB (^I)		Command/filename completion
Return/Newline (^J/^M)	End editing :-)

HELP			String assigned in variable HELP
F1			String in variable F1
 :			 :
 :			 :
F20			String in variable F20