Tutorial_Shell_E - Aros the OpenSource OS running on UAE and real hardware

Elektrotechnik Zenker
Direkt zum Seiteninhalt
Tutorial Shell


Much of the following descrptions taken from official page: (https://aros.sourceforge.io/documentation/users/shell/introduction.php)



The AROS Shell
The Shell has a command history. You can access it with cursor up and down keys.
You can move the cursor in the current command line with the cursor left and right keys and delete characters with the backspace and delete keys.
AROS commands and filenames are case insensitive. You can even use mixed case.
AROS searches commands in the current directory and in the search path. You can view and change the search path with the Path command.

List of AmigaDOS compatible Commands that are either from AROS or other sources:

AddBuffers
AddDatatypes
Alias
Ask
Assign
Avail
Binddrivers
Break
cd
ChangeTaskPri
colors
conclip
cpu
date
delete
dir
diskchange
display
echo
else
endcli
endif
endshell
endskip
eval
execute
failat
fault
filenote
format
get
getenv
iconx
if
info
install
iprefs
join
lab
list
loadwb
lock
makedir
makelink
more
mount
multiview
newcli
newshell
path
prompt
protect
quit
relabel
rename
requestchoice
resident
run
search
set
setclock
setdate
setenv
setfont
setkeyboard
setpatch
skip
sort
stack
status
type
unalias
unset
unsetenv
version
wait
which
why

there are many more commands additional included



Path

Absolute paths start with the drive name and a colon (:), directories are separated with a slash (/). The drive name can be a device name (dh0:), a volume name (workbench:) or a logical drive (see Assign command)
Example: dh0:dir1/dir2/file.dat 
If you need the current path as argument of a command, you can just write "".
Example: copy from ram:x to "" 
When the path starts with a colon then it is relative to the root directory of the current path.
A slash at the beginning of a path means: go one level up. Two slashes mean go two levels up and so on.
When a path contains spaces it must be written within double quote characters.
Example: type "name with spaces"

Command Template
A question mark after the command shows the parameter template of the command. The command is then in a mode where it waits for you to type in the parameters.
Example: copy ? FROM/M,TO/A,ALL/S,QUIET/S,BUF=BUFFER/K/N,CLONE/S,DATES/S,NOPRO/S,COM/S,NOREQ/S 
The keywords can have options:
/A -- argument must be given /K -- keyword must be written when using this argument /S -- switch; just write the keyword to access the switch /N -- numerical argument /M -- more than one argument is possible /F -- rest of command line =  -- abbreviation; you can optionally use the abbreviation 
Some commands, like Copy, have an extended help. You can see it when you type again a question mark after the short help is shown.
When calling a command '=' can be used for distinct assignment between keyword and value:
Example: copy from=a.dat to=b.dat.

patterns

Some commands allow patterns for filename parameters:
?  -- one arbitrary character #? -- zero or more arbitrary characters #x -- zero or more x ~  -- negation %  -- matches the null string (no characters). |  -- or () -- group [] -- range '  -- disable the following special character 
Examples:
dir #?.info dir #?~(.info) dir a(b|c)d dir [a-c]e dir a(b|d|%)#c

redirection

> redirects output to file or device >> redirects output and appends to file < redirects input from file or device  Example: dir >ram:a

pipe

If you want to forward the output of a command to another command you can use the pipe. You have to connect the commands with a | character. There must be at least one space before and after the |:
Example: dir | othercommand 
But what if the second command wants to read the input from a file? The solution is to use the fake device 'in:':
Example: dir | more in:

Special drives

  • ram: you can use the ram disk like a hard drive. But after a reset its content is lost.
  • nil: if you don't want the messages of a command to be displayed in the window you can use the 'nil:' device. Example: delete #? >nil:
  • con: read/write from/to another Shell window
  • console: the current Shell window
  • sys: the drive from which AROS was booted
  • ser: the serial interface
  • par: the parallel interface
  • clip: clipboard
  • pipe: pipe between programs

Zurück zum Seiteninhalt