shell is an unusual script runner. It's unique properties make it much superior than commonly used batch files for things like test scripts:
Script files are text files with a .sh extension, consisting of a sequence of lines. Lines are \ line spliced. Each line is one of:
Blank lines are used to separate command lines into groups. Groups of commmand lines are executed multiple times, once for each combination of options. Comment and macro lines are not group separators.
Commands can be prefixed with a special character to control how it is executed (just like makefiles for make):
Macros are expanded like in make, i.e. one letter macros are expanded by $M, multi-letter macros by $(ABC).
Options are specified as lists of | separated choices enclosed by parentheses, such as:
del *.(c|h)
means execute the command twice, once using the c and the other time using the h. Blank options, like (c|), are allowed. Multiple options can be used:
dir *.(c|) /(w|d)
will execute the command 4 times with:
dir *.c /w dir *. /w dir *.c /d dir *. /d
The substitutions are stored as numbered macros, and are available for expansion in the subsequent lines in the group as well:
dmc -m(s|n) test (-g|-o) link lib1ドル
causes these to be executed:
dmc -ms test -g link libs dmc -mn test -g link libn dmc -ms test -o link libs dmc -mn test -o link libn
Shell is invoked by:
shell [-man] [-j [numthreads]] filename.sh { macro definitions }
If no filename.sh is given, shell looks for and runs test.sh.
macro definitions are of the form NAME=VALUE.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル