Kenji Arisawa E-mail: arisawa@aichi-u.ac.jp Aichi University Kurozasa 370, Miyoshi-cho Aichi, Japan 2002/03/19
Note: the version is 0.5. This means current version is merely a trial one.
dx [-s][-e] [file [arg ...]]The result is written to stdout. Dx processes stdin unless file is specified. If file is specified, dx has two options:
-s
: skip the first line in the file.-e
: stop to process on error.$variable
${commandline}
$[condition]{commandline}
variable
denotes an environment variable, commandline
denotes command line and condition
denotes a condition to execute a command$
is effective only if it is followed by variable name or {
or [
.
Spaces between ]
and {
result in error.
{commandline}
is allowed to be written in more than one line, however [condition]
must be written in one line.
Double doller $$
is converted to single $
.
And single doller $
at the last of line restrains new line.
$variable
with its value if the value exist. If not, $variable
is replaced by null string.
ドキュメント内に環境変数 variable
が存在すると $variable
はその内容に置き換わります。存在しない場合には無視されます。
環境変数名は単純形、即ち、英数字および下線記号からのみ構成されると仮定されています。
環境変数 $0, $1, $2, ...
$0 dx を起動した時のfile
$1 dx を起動した時の最初のarg
$2 dx を起動した時の第二のarg
$3 ...
環境変数は現在のところ rc のように配列ではありません。(これは将来改善すべき部分です。) 従って
${cmd='ls -l' $cmd}
を実行しても rc と同様に 'ls -l' なんてないよとエラーになります。
(rc はこの場合、
cmd=(ls -l} $cmd
とします。)