|
|
(9 intermediate revisions by the same user not shown) |
Line 245: |
Line 245: |
|
| |
|
| === Short-Circuit List Operators === | | === Short-Circuit List Operators === |
| “&&” and “||” are AND-OR list operators. “&&” executes the first command, and then executes the sec‐
| | "&&"と"||"はAND-ORリスト演算子である。 "&&"は、最初のコマンドを実行し、最初のコマンドの終了ステータスがゼロの場合に限り、2番目のコマンドを実行する。 "||"も同様だが、最初のコマンドの終了ステータスがゼロでない場合にのみ、2番目のコマンドを実行する。 "&&"と"||"はどちらも同じ優先度を持つ。 |
| ond command if and only if the exit status of the first command is zero. “||” is similar, but exe‐
| |
| cutes the second command if and only if the exit status of the first command is nonzero. “&&” and
| |
| “||” both have the same priority.
| |
|
| |
|
| Flow-Control Constructs – if, while, for, case
| | フロー制御構文 - if、while、for、case |
| The syntax of the if command is
| | ifコマンドの構文は以下の通りである。 |
|
| |
|
| if list | | if list |
Line 260: |
Line 257: |
| fi | | fi |
|
| |
|
| The syntax of the while command is
| | whileコマンドの構文は以下の通りである。 |
|
| |
|
| while list | | while list |
Line 266: |
Line 263: |
| done | | done |
|
| |
|
| The two lists are executed repeatedly while the exit status of the first list is zero. The until com‐
| | 最初のリストの終了ステータスがゼロの間、2つのリストが繰り返し実行される。 untilコマンドも似ているが、whileの代わりにuntilという単語があり、最初のリストの終了ステータスがゼロになるまで繰り返される。 |
| mand is similar, but has the word until in place of while, which causes it to repeat until the exit
| |
| status of the first list is zero.
| |
|
| |
|
| The syntax of the for command is
| | forコマンドの構文は以下の通りである。 |
|
| |
|
| for variable [ in [ word ... ] ] | | for variable [ in [ word ... ] ] |
Line 276: |
Line 271: |
| done | | done |
|
| |
|
| The words following in are expanded, and then the list is executed repeatedly with the variable set to
| | inに続く単語が展開され、変数に各単語が順番にセットされた状態でリストが繰り返し実行される。 in word ...を省略すると、in "$@"と同じになる。 |
| each word in turn. Omitting in word ... is equivalent to in "$@".
| |
|
| |
|
| The syntax of the break and continue command is
| | break and continueコマンドの構文は以下の通りである。 |
|
| |
|
| break [ num ] | | break [ num ] |
| continue [ num ] | | continue [ num ] |
|
| |
|
| Break terminates the num innermost for or while loops. Continue continues with the next iteration of
| | Breakは、最も内側のforまたはwhileループを終了させる。 Continueは、最も内側のループの次の反復を続ける。 これらは組み込みコマンドとして実装されている。 |
| the innermost loop. These are implemented as builtin commands.
| |
|
| |
|
| The syntax of the case command is
| | caseコマンドの構文は以下の通りである。 |
|
| |
|
| case word in | | case word in |
Line 294: |
Line 287: |
| esac | | esac |
|
| |
|
| The pattern can actually be one or more patterns (see Shell Patterns described later), separated by
| | パターンは実際には1つ以上のパターン(後述のシェルパターンを参照)にすることができ、"|"文字で区切られる。 パターンの前の"("文字はオプションである。 |
| “|” characters. The “(” character before the pattern is optional.
| |
|
| |
|
| Grouping Commands Together
| | コマンドをグループ化する |
| Commands may be grouped by writing either
| | |
| | コマンドは |
|
| |
|
| (list) | | (list) |
Line 306: |
Line 299: |
| { list; } | | { list; } |
|
| |
|
| The first of these executes the commands in a subshell. Builtin commands grouped into a (list) will
| | これらのうち最初のものは、サブシェル内のコマンドを実行する。 (リスト)にグループ化された組み込みコマンドは、現在のシェルに影響を与えない。 2番目の形式は、別のシェルをフォークしないので、少し効率的である。 このようにコマンドをグループ化することで、あたかも1つのプログラムであるかのように出力をリダイレクトすることができる: |
| not affect the current shell. The second form does not fork another shell so is slightly more effi‐
| |
| cient. Grouping commands together this way allows you to redirect their output as though they were
| |
| one program:
| |
|
| |
|
| { printf " hello " ; printf " world\n" ; } > greeting | | { printf " hello " ; printf " world\n" ; } > greeting |
|
| |
|
| Note that “}” must follow a control operator (here, “;”) so that it is recognized as a reserved word
| | 他のコマンド引数としてではなく、予約語として認識されるように、"}"は制御演算子(ここでは";")の後に続かなければならないことに注意。 |
| and not as another command argument.
| |
|
| |
|
| Functions
| | 関数 |
| The syntax of a function definition is
| | |
| | 関数定義の構文は以下の通りである。 |
|
| |
|
| name () command | | name () command |
|
| |
|
| A function definition is an executable statement; when executed it installs a function named name and
| | 実行されると、nameという名前の関数がインストールされ、終了ステータスはゼロを返す。 コマンドは通常、"{"と"}"で囲まれたリストである。 |
| returns an exit status of zero. The command is normally a list enclosed between “{” and “}”.
| |
|
| |
|
| Variables may be declared to be local to a function by using a local command. This should appear as
| | 変数は、localコマンドを使用することで、関数に対してlocalであることを宣言することができる。 これは関数の最初のステートメントとして記述する。 |
| the first statement of a function, and the syntax is
| |
|
| |
|
| local [variable | -] ... | | local [variable | -] ... |
|
| |
|
| Local is implemented as a builtin command.
| | localは組み込みコマンドとして実装されている。 |
|
| |
|
| When a variable is made local, it inherits the initial value and exported and readonly flags from the
| | 変数をlocalにすると、その変数の初期値、エクスポートとリードオンリーのフラグを、周囲のスコープに同じ名前の変数があれば、その変数から継承する。 そうでない場合、変数は初期値として設定されない。 シェルは動的スコープを使用するため、変数xを関数fのlocalにし、その関数fが関数gを呼び出した場合、gの内部で作成された変数xへの参照は、xという名前のグローバル変数ではなく、fの内部で宣言された変数xを参照することになる。 |
| variable with the same name in the surrounding scope, if there is one. Otherwise, the variable is
| |
| initially unset. The shell uses dynamic scoping, so that if you make the variable x local to function
| |
| f, which then calls function g, references to the variable x made inside g will refer to the variable
| |
| x declared inside f, not to the global variable named x.
| |
|
| |
|
| The only special parameter that can be made local is “-”. Making “-” local any shell options that are
| | localにできる唯一の特別なパラメーターは"-"である。 localに"-"を指定すると、関数内でsetコマンドによって変更されたシェル・オプションは、関数が戻ったときに元の値に戻される。 |
| changed via the set command inside the function to be restored to their original values when the func‐
| |
| tion returns.
| |
|
| |
|
| The syntax of the return command is
| | returnコマンドの構文は以下の通りである。 |
|
| |
|
| return [exitstatus] | | return [exitstatus] |
|
| |
|
| It terminates the currently executing function. Return is implemented as a builtin command.
| | 現在実行中の関数を終了させる。 returnは組み込みコマンドとして実装されている。 |
|
| |
|
| === Variables and Parameters === | | === Variables and Parameters === |
| The shell maintains a set of parameters. A parameter denoted by a name is called a variable. When
| | シェルはパラメーターのセットを保持する。 名前で示されるパラメータは変数と呼ばれる。 起動時、シェルはすべての環境変数をシェル変数に変える。 新しい変数は |
| starting up, the shell turns all the environment variables into shell variables. New variables can be
| |
| set using the form
| |
|
| |
|
| name=value | | name=value |
|
| |
|
| Variables set by the user must have a name consisting solely of alphabetics, numerics, and underscores
| | ユーザーによって設定される変数は、アルファベット、数字、アンダースコアからなる名前でなければならない。 パラメータは、以下に説明するように、数字や特殊文字で表すこともできる。 |
| - the first of which must not be numeric. A parameter can also be denoted by a number or a special
| |
| character as explained below.
| |
|
| |
|
| === Positional Parameters === | | === Positional Parameters === |
| A positional parameter is a parameter denoted by a number (n > 0). The shell sets these initially to
| | 位置パラメーターは、数字(n > 0)で示されるパラメーターである。 シェルはこれらを、シェルスクリプトの名前に続くコマンドライン引数の値に初期設定する。 set 組み込み関数を使用して、これらを設定またはリセットすることもできる。 |
| the values of its command line arguments that follow the name of the shell script. The set builtin
| |
| can also be used to set or reset them.
| |
|
| |
|
| === Special Parameters === | | === Special Parameters === |
| A special parameter is a parameter denoted by one of the following special characters. The value of
| | 特殊パラメータは、以下の特殊文字のいずれかで示されるパラメータである。 パラメータの値は、その文字の横に記載されている。 |
| the parameter is listed next to its character.
| |
|
| |
|
| * Expands to the positional parameters, starting from one. When the expansion occurs
| | ;* |
| within a double-quoted string it expands to a single field with the value of each parame‐
| | :位置パラメータを1から順に展開する。 展開が二重引用符で囲まれた文字列の中で行われる場合、各パラメータの値が IFS変数の最初の文字で区切られた1つのフィールドに展開され、IFSが設定されていない場合は ⟨スペース⟩で区切られる。 |
| ter separated by the first character of the IFS variable, or by a ⟨space⟩ if IFS is un‐
| |
| set.
| |
|
| |
|
| @ Expands to the positional parameters, starting from one. When the expansion occurs
| | ;@ |
| within double-quotes, each positional parameter expands as a separate argument. If there
| | :位置パラメータを1から順に展開する。 展開が二重引用符で囲まれている場合、各位置パラメータは別々の引数として展開される。 位置パラメーターがない場合、@が二重引用符で囲まれていても、@の展開は0個の引数を生成する。 これが基本的に意味するのは、例えば$1が "abc "で$2が "def ghi "の場合、"$@"は2つの引数に展開されるということである: |
| are no positional parameters, the expansion of @ generates zero arguments, even when @ is
| |
| double-quoted. What this basically means, for example, is if $1 is “abc” and $2 is “def
| |
| ghi”, then "$@" expands to the two arguments:
| |
|
| |
|
| "abc" "def ghi"
| | ::<nowiki>"abc" "def ghi"</nowiki> |
|
| |
|
| # Expands to the number of positional parameters.
| | ;# |
| | :位置パラメーターの数に拡張する。 |
|
| |
|
| ? Expands to the exit status of the most recent pipeline.
| | ;? |
| | :直近のパイプラインの終了ステータスに展開する。 |
|
| |
|
| - (Hyphen.) Expands to the current option flags (the single-letter option names concatenated into a
| | ;- (Hyphen.) |
| string) as specified on invocation, by the set builtin command, or implicitly by the
| | :起動時、set 組み込みコマンド、またはシェルによって暗黙的に指定された、現在のオプションフラグ(1文字のオプション名を連結した文字列)に展開する。 |
| shell.
| |
|
| |
|
| $ Expands to the process ID of the invoked shell. A subshell retains the same value of $
| | ;$ |
| as its parent.
| | :呼び出されたシェルのプロセス ID に展開される。 サブシェルは、親と同じ $ の値を保持する。 |
|
| |
|
| ! Expands to the process ID of the most recent background command executed from the current
| | ;! |
| shell. For a pipeline, the process ID is that of the last command in the pipeline.
| | :現在のシェルから実行された最新のバックグラウンド・コマンドのプロセスIDに展開される。 パイプラインの場合、プロセスIDはパイプラインの最後のコマンドのものになる。 |
|
| |
|
| 0 (Zero.) Expands to the name of the shell or shell script.
| | ;0 (Zero.) |
| | :シェルまたはシェルスクリプトの名前に展開する。 |
|
| |
|
| === Word Expansions === | | === Word Expansions === |
| This clause describes the various expansions that are performed on words. Not all expansions are per‐
| | この節では、単語に対して行われる様々な展開について説明する。 後述するように、すべての展開がすべての単語に対して行われるわけではない。 |
| formed on every word, as explained later.
| | 後述するように、すべての単語に適用されるわけではない。 |
| | |
| Tilde expansions, parameter expansions, command substitutions, arithmetic expansions, and quote re‐
| |
| movals that occur within a single word expand to a single field. It is only field splitting or path‐
| |
| name expansion that can create multiple fields from a single word. The single exception to this rule
| |
| is the expansion of the special parameter @ within double-quotes, as was described above.
| |
| | |
| The order of word expansion is:
| |
|
| |
|
| 1. Tilde Expansion, Parameter Expansion, Command Substitution, Arithmetic Expansion (these all occur
| | チルダ展開、パラメータ展開、コマンド置換、算術展開、引用符除去のうち、1つの単語内で行われるものは、1つのフィールドに展開される。 一つの単語から複数のフィールドを作ることができるのは、フィールドの分割かパス名の展開だけである。 このルールの唯一の例外は、上で説明したように、ダブルクォート内での特殊パラメータ@の展開である。 |
| at the same time).
| |
|
| |
|
| 2. Field Splitting is performed on fields generated by step (1) unless the IFS variable is null.
| | 単語展開の順序は以下の通りである: |
|
| |
|
| 3. Pathname Expansion (unless set -f is in effect).
| | #チルダ展開、パラメータ展開、コマンド置換、算術展開(これらはすべて同時に行われる)。 |
| | #フィールド分割は、IFS変数がNULLでない限り、ステップ(1)で生成されたフィールドに対して行われる。 |
| | #パス名展開(set -fが有効な場合を除く)。 |
| | #引用符の除去。 |
|
| |
|
| 4. Quote Removal.
| | 文字は、パラメータ展開、コマンド置換、または算術評価の導入に使用される。 |
|
| |
|
| The $ character is used to introduce parameter expansion, command substitution, or arithmetic evalua‐
| | チルダ展開(ユーザーのホームディレクトリを置換する)。 |
| tion.
| | 引用符で囲まれていないチルダ文字(~)で始まる単語は、チルダ展開の対象となる。 スラッシュ(/)または語尾までのすべての文字がユーザー名として扱われ、そのユーザーのホームディレクトリに置き換えられる。 ユーザー名がない場合(~/foobarのように)、チルダはHOME変数の値(現在のユーザーのホームディレクトリ)に置き換えられる。 |
| | |
| Tilde Expansion (substituting a user's home directory)
| |
| A word beginning with an unquoted tilde character (~) is subjected to tilde expansion. All the char‐
| |
| acters up to a slash (/) or the end of the word are treated as a username and are replaced with the
| |
| user's home directory. If the username is missing (as in ~/foobar), the tilde is replaced with the
| |
| value of the HOME variable (the current user's home directory).
| |
|
| |
|
| === Parameter Expansion === | | === Parameter Expansion === |
| The format for parameter expansion is as follows:
| | パラメータ展開のフォーマットは以下の通りである: |
|
| |
|
| ${expression} | | ${expression} |
|
| |
|
| where expression consists of all characters until the matching “}”. Any “}” escaped by a backslash or
| | 式は、マッチする"}"までのすべての文字で構成される。 バックスラッシュでエスケープされた"}"、または引用符で囲まれた文字列内の"}"、および 埋め込み算術展開、コマンド置換、変数展開の文字は、マッチする"}"を決定する際には検査されない。 |
| within a quoted string, and characters in embedded arithmetic expansions, command substitutions, and
| |
| variable expansions, are not examined in determining the matching “}”.
| |
|
| |
|
| The simplest form for parameter expansion is:
| | パラメータ展開の最も単純な形式は以下のとおりである: |
|
| |
|
| ${parameter} | | ${parameter} |
|
| |
|
| The value, if any, of parameter is substituted.
| | パラメータの値があれば、その値が代入される。 |
| | |
| The parameter name or symbol can be enclosed in braces, which are optional except for positional pa‐
| |
| rameters with more than one digit or when parameter is followed by a character that could be inter‐
| |
| preted as part of the name. If a parameter expansion occurs inside double-quotes:
| |
|
| |
|
| 1. Pathname expansion is not performed on the results of the expansion.
| | パラメータ名または記号は中括弧で囲むことができる。中括弧は、1桁以上の位置パラメー タや、パラメータの後に名前の一部として解釈される文字が続く場合を除き、省略可能である。 パラメータ展開が二重引用符で囲まれている場合、そのパラメータは中括弧で囲むことができる: |
|
| |
|
| 2. Field splitting is not performed on the results of the expansion, with the exception of @.
| | #パス名展開は展開結果に対して行われない。 |
| | #フィールド分割は、@を除いて、展開結果に対して実行されない。 |
|
| |
|
| In addition, a parameter expansion can be modified by using one of the following formats.
| | さらに、以下の書式のいずれかを使用することで、パラメータ展開を変更することができる。 |
|
| |
|
| ${parameter:-word} Use Default Values. If parameter is unset or null, the expansion of word is
| | ;<nowiki>${parameter:-word}</nowiki> |
| substituted; otherwise, the value of parameter is substituted.
| | :デフォルト値を使用する。 パラメータが未設定またはNULLの場合、wordの展開が代入され、そうでない場合、パラメータの値が代入される。 |
|
| |
|
| ${parameter:=word} Assign Default Values. If parameter is unset or null, the expansion of word is
| | ;<nowiki>${parameter:=word}</nowiki> |
| assigned to parameter. In all cases, the final value of parameter is substi‐
| | :デフォルト値を割り当てる。 パラメータが未設定または NULL の場合、単語の展開がパラメータに代入される。 すべての場合において、パラメータの最終値が代入される。 この方法で代入できるのは変数のみで、位置パラメーターや特殊パラメーターは代入できない。 |
| tuted. Only variables, not positional parameters or special parameters, can be
| |
| assigned in this way.
| |
|
| |
|
| ${parameter:?[word]} Indicate Error if Null or Unset. If parameter is unset or null, the expansion
| | ;<nowiki>${parameter:?[word]}</nowiki> |
| of word (or a message indicating it is unset if word is omitted) is written to
| | :Nullまたは未設定の場合、エラーを表示する。 パラメータが未設定またはNULLの場合、wordの展開(wordが省略された場合は未設定であることを示すメッセージ)が標準エラーに書き込まれ、シェルは0以外の終了ステータスで終了する。 そうでなければ、パラメータの値が代入される。 対話型シェルは終了する必要はない。 |
| standard error and the shell exits with a nonzero exit status. Otherwise, the
| |
| value of parameter is substituted. An interactive shell need not exit.
| |
|
| |
|
| ${parameter:+word} Use Alternative Value. If parameter is unset or null, null is substituted; oth‐
| | ;<nowiki>${parameter:+word}</nowiki> |
| erwise, the expansion of word is substituted.
| | :代替値を使用する。 パラメータが未設定またはNULLの場合、NULLが代入され、そうでない場合、単語の展開が代入される。 |
|
| |
|
| In the parameter expansions shown previously, use of the colon in the format results in a test for a
| | :先に示したパラメータ展開では、書式にコロンを使用すると、パラメータが未設定またはNULLであるかどうかをテストすることになる。 |
| parameter that is unset or null; omission of the colon results in a test for a parameter that is only
| |
| unset.
| |
|
| |
|
| ${#parameter} String Length. The length in characters of the value of parameter.
| | ;<nowiki>${#parameter}</nowiki> |
| | :文字列の長さ。 パラメータ値の文字数。 |
|
| |
|
| The following four varieties of parameter expansion provide for substring processing. In each case,
| | 以下の4種類のパラメータ拡張は、部分文字列処理を提供する。 いずれの場合も、パターンの評価には正規表現表記ではなく、パターンマッチング表記(シェルパターン参照)が使われる。 パラメータが*または@の場合、展開結果は不定である。 パラメータ展開文字列全体を二重引用符で囲むと、次の4種類のパターン文字は引用符で囲まれないが、中括弧内の文字は引用符で囲まれる。 |
| pattern matching notation (see Shell Patterns), rather than regular expression notation, is used to
| |
| evaluate the patterns. If parameter is * or @, the result of the expansion is unspecified. Enclosing
| |
| the full parameter expansion string in double-quotes does not cause the following four varieties of
| |
| pattern characters to be quoted, whereas quoting characters within the braces has this effect.
| |
|
| |
|
| ${parameter%word} Remove Smallest Suffix Pattern. The word is expanded to produce a pattern. The
| | ;<nowiki>${parameter%word}</nowiki> |
| parameter expansion then results in parameter, with the smallest portion of the
| | :最小接尾辞パターンを取り除く。 単語を展開してパターンを生成する。 パラメータ展開の結果、パターンにマッチする接尾辞の最小部分が削除されたパラメータが得られる。 |
| suffix matched by the pattern deleted.
| |
|
| |
|
| ${parameter%%word} Remove Largest Suffix Pattern. The word is expanded to produce a pattern. The
| | ;<nowiki>${parameter%%word}</nowiki> |
| parameter expansion then results in parameter, with the largest portion of the
| | :最大の接尾辞パターンを取り除く。 単語を展開してパターンを生成する。 そして、パラメータ展開の結果、パターンにマッチする接尾辞の最大部分が削除されたパラメータが生成される。 |
| suffix matched by the pattern deleted.
| |
|
| |
|
| ${parameter#word} Remove Smallest Prefix Pattern. The word is expanded to produce a pattern. The
| | ;<nowiki>${parameter#word}</nowiki> |
| parameter expansion then results in parameter, with the smallest portion of the
| | :最小の接頭辞パターンを取り除く。 単語を展開してパターンを生成する。 パラメータ展開の結果、パターンにマッチする接頭辞の最小部分が削除されたパラメータが得られる。 |
| prefix matched by the pattern deleted.
| |
|
| |
|
| ${parameter##word} Remove Largest Prefix Pattern. The word is expanded to produce a pattern. The
| | ;<nowiki>${parameter##word}</nowiki> |
| parameter expansion then results in parameter, with the largest portion of the
| | :最大の接頭辞パターンを取り除く。 単語を展開してパターンを生成する。 パラメータ展開の結果、パターンにマッチする接頭辞の最大部分が削除されたパラメータが得られる。 |
| prefix matched by the pattern deleted.
| |
|
| |
|
| === Command Substitution === | | === Command Substitution === |
| Command substitution allows the output of a command to be substituted in place of the command name it‐
| | コマンド置換では、コマンド名の代わりにコマンドの出力を置換することができる。 コマンド置換は、コマンドが以下のように囲まれているときに行われる: |
| self. Command substitution occurs when the command is enclosed as follows:
| |
|
| |
|
| $(command) | | $(command) |
Line 504: |
Line 446: |
| `command` | | `command` |
|
| |
|
| The shell expands the command substitution by executing command in a subshell environment and replac‐
| | シェルは、サブシェル環境でコマンドを実行し、コマンドの標準出力でコマン ド置換を置き換えることで、コマンド置換を展開し、置換の最後にある1つ以上の ⟨改行⟩のシーケンスを削除する。 (出力の末尾の前に埋め込まれた⟩は削除されないが、フィールド分割の際に、有効なIFSとquotingの値によっては、⟨space⟩に変換されることがある)。 |
| ing the command substitution with the standard output of the command, removing sequences of one or
| |
| more ⟨newline⟩s at the end of the substitution. (Embedded ⟨newline⟩s before the end of the output are
| |
| not removed; however, during field splitting, they may be translated into ⟨space⟩s, depending on the
| |
| value of IFS and quoting that is in effect.)
| |
|
| |
|
| === Arithmetic Expansion === | | === Arithmetic Expansion === |
| Arithmetic expansion provides a mechanism for evaluating an arithmetic expression and substituting its
| | 算術展開は、算術式を評価し、その値を代入するメカニズムを提供する。 算術展開の書式は以下の通りである: |
| value. The format for arithmetic expansion is as follows:
| |
|
| |
|
| $((expression)) | | $((expression)) |
|
| |
|
| The expression is treated as if it were in double-quotes, except that a double-quote inside the ex‐
| | 式は二重引用符で囲まれているかのように扱われるが、式の中の二重引用符は特別に扱われない。 シェルは、パラメータ展開、コマンド置換、引用符除去のために、式のすべてのトークンを展開する。 |
| pression is not treated specially. The shell expands all tokens in the expression for parameter ex‐
| |
| pansion, command substitution, and quote removal.
| |
|
| |
|
| Next, the shell treats this as an arithmetic expression and substitutes the value of the expression.
| | 次に、シェルはこれを算術式として扱い、式の値を代入する。 |
|
| |
|
| === White Space Splitting (Field Splitting) === | | === White Space Splitting (Field Splitting) === |
| After parameter expansion, command substitution, and arithmetic expansion the shell scans the results
| | パラメータ展開、コマンド置換、算術展開の後、シェルはフィールド分割のためにダブルクォートで発生しなかった展開と置換の結果をスキャンし、複数のフィールドが発生することがある。 |
| of expansions and substitutions that did not occur in double-quotes for field splitting and multiple
| |
| fields can result.
| |
|
| |
|
| The shell treats each character of the IFS as a delimiter and uses the delimiters to split the results
| | シェルはIFSの各文字をデリミタとして扱い、デリミタを使ってパラメータ展開やコマンド置換の結果をフィールドに分割する。 |
| of parameter expansion and command substitution into fields.
| |
|
| |
|
| === Pathname Expansion (File Name Generation) === | | === Pathname Expansion (File Name Generation) === |