1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Bashのマニュアルを読む

Last updated at Posted at 2020-10-17

bashのマニュアルを読んでいきたいと思います。

1 BASH(1)

[root@sandbox ~]# man bash
BASH(1)                                                                                                 General Commands Manual                                                                                                 BASH(1)

NAME
       bash - GNU Bourne-Again SHell

SYNOPSIS
       bash [options] [file]

COPYRIGHT
       Bash is Copyright (C) 1989-2011 by the Free Software Foundation, Inc.

DESCRIPTION
       Bash is an sh-compatible command language interpreter that executes commands read from the standard input or from a file.  Bash also incorporates useful features from the Korn and C shells (ksh and csh).

       Bash is intended to be a conformant implementation of the Shell and Utilities portion of the IEEE POSIX specification (IEEE Standard 1003.1).  Bash can be configured to be POSIX-conformant by default.

1-1 NAME

NAME
   bash - GNU Bourne-Again SHell

NAME
bash - GNU Bourne-Again SHell

bashの名称は「GNU Bourne-Again SHell」

Bourne - ボーン; バーン; ブアーン、ボーン、『ボーン』シリーズは、作家のロバート・ラドラムが創造した、心因性健忘に苦しむ架空の元CIA暗殺者、ジェイソン・ボーンを主役としたスパイ映画である。
https://ejje.weblio.jp/content/Bourne

Again - 再び、また、重ねて、元の所へ、さらにそれだけ、もう…だけ、さらに、そのうえに、また一方
https://ejje.weblio.jp/content/Again

SHell - 貝殻、(カキの)殻、(カメ・エビ・カニなどの)甲羅、(カブトムシなどの)硬い外皮、(鳥の卵の)殻、(果実・種子などの)殻、(豆類の)さや、(建物・乗り物などの)骨組み、外郭、船体
https://ejje.weblio.jp/content/SHell

1-2 SYNOPSIS

SYNOPSIS
   bash [options] [file]

SYNOPSIS
bash [options] [file]

概要
bashコマンドの使い方は bash [options] [file]

SYNOPSIS - (映画・劇・書籍・論文などの)梗概(こうがい)、大意、一覧(表)
https://ejje.weblio.jp/content/SYNOPSIS

1-3 COPYRIGHT

COPYRIGHT
   Bash is Copyright (C) 1989-2011 by the Free Software Foundation, Inc.

COPYRIGHT
Bash is Copyright (C) 1989-2011 by the Free Software Foundation, Inc.

Bashの著作権はthe Free Software Foundation, Inc(1989-2011)

COPYRIGHT - 著作権、版権、コピーライト
https://ejje.weblio.jp/content/COPYRIGHT

1-4 DESCRIPTION

DESCRIPTION
Bash is an sh-compatible command language interpreter that executes commands read from the standard input or from a 
file.  Bash also incorporates useful features from the Korn and C shells (ksh and csh).<br>

DESCRIPTION
Bash is an sh-compatible command language interpreter that executes commands read from the standard input or from a
file. Bash also incorporates useful features from the Korn and C shells (ksh and csh).

Bashは、標準入力から読み取られたコマンドを実行するsh互換のコマンド言語インタープリターです。
またはファイルから。 Bashには、KornシェルとCシェル(kshとcsh)の便利な機能も組み込まれています。

interpreter - 解釈者、説明者、通訳(者)、インタープリター、解釈プログラム
https://ejje.weblio.jp/content/interpreter

command - (権力・権限のある者が正式に)(…を)命令する、命じる、(…を)指揮する、率いる、支配する、抑える、自制する、(…を)意のままにする、自由にできる、集める
https://ejje.weblio.jp/content/command

language - (音声・文字による)言語、(一国・一民族などの)国語、…語、専門用語、術語、語法、文法、言葉づかい、言い回し、(音声・文字を用いない
https://ejje.weblio.jp/content/language

execute - 実行する、遂行する、達成する、実施する、執行する、施行する、死刑を執行する、処刑する、演ずる、演奏する
https://ejje.weblio.jp/content/execute

standard - (比較・評価の基礎となる)標準、基準、道徳的規範、しきたり、(度量衡の)標準(器)、原器、本位、燭台、ランプ台、まっすぐな支え
https://ejje.weblio.jp/content/standard

input - 入力、インプット、入力(信号)、入力操作、(資金などの)投入(量)
https://ejje.weblio.jp/content/input

file - (書類・新聞などを整理するための)ファイル、とじ込み帳、とじ込み帳整理箱、(書類などの)とじひも、(項目別に整理された)とじ込み帳、書類、記録、ファイル、(縦の)列、伍(ご)
https://ejje.weblio.jp/content/file

incorporate - (…を)(…と)合体させる、合同させる、(…を)(…に)合併する、編入する、法人組織にする、(…を)(有限責任)会社にする、(ある団体に)加入させる、する、具体化する、(…に)組み入れる
https://ejje.weblio.jp/content/incorporate

useful - 役に立つ、有益な、有用な、(…に)役立つ、役立って、有能な、腕のよい
https://ejje.weblio.jp/content/useful

feature - 顔の造作、容貌(ようぼう)、顔だち、目鼻だち、(著しい)特徴、特色、主要点、(映画・ショーなどの番組中の)呼び物、聞き物、見もの
https://ejje.weblio.jp/content/feature

Korn - コーン; コルン
https://ejje.weblio.jp/content/Korn

Bash is intended to be a conformant implementation of the Shell and Utilities portion of the IEEE POSIX specification (IEEE Standard 1003.1).  Bash can be configured to be POSIX-conformant by default.

Bash is intended to be a conformant implementation of the Shell and Utilities portion of the IEEE POSIX specification (IEEE Standard 1003.1). Bash can be configured to be POSIX-conformant by default.

Bashは、IEEE POSIX仕様(IEEE標準1003.1)のシェルおよびユーティリティ部分の適合実装となることを目的としています。 Bashは、デフォルトでPOSIX準拠になるように構成できます。

intend - 意図する、もくろむ、つもりである、めざす、(…が)意図する、向けようとする、(…を)意図する、(…が)つもりとする、(…で)(…を)意味する
https://ejje.weblio.jp/content/intend

conformant - 準拠したもの;適合したもの
https://ejje.weblio.jp/content/conformant

implementation - 履行、実行、実施、充足
https://ejje.weblio.jp/content/implementation

utilitiy - 効用、有用、有益、実利、功利(性)、役に立つもの、公益事業(体)
https://ejje.weblio.jp/content/Utility

portion - (切り離された)一部、部分、(2 人以上で分けられた)分け前、分与産、相続分、持参金、1 人前、運命
https://ejje.weblio.jp/content/portion

IEEE - アメリカ電気電子工学会; 電気電子技術者協会
https://ejje.weblio.jp/content/IEEE

POSIX - POSIXとは、オペレーティングシステム(OS)の一種であるUNIXに関する標準的なインターフェースを定めた規格のことである。、ポジックス
https://ejje.weblio.jp/content/POSIX

specification - 詳述、列挙、明細、明細事項、(建物・車などの)設計書、仕様書(しようしよ)
https://ejje.weblio.jp/content/specification

configure - 形成する、設定する、設計する
https://ejje.weblio.jp/content/configure

default - (義務などの)不履行、怠慢、債務不履行、(法廷への)欠席、不出場、欠場、棄権
https://ejje.weblio.jp/content/default

2 OPTIONS

OPTIONS
       All of the  single-character shell options documented in the description of the set builtin command can be used as options when the shell is invoked.  In addition, bash interprets the following options when it is invoked:

       -c string If the -c option is present, then commands are read from string.  If there are arguments after the string, they are assigned to the positional parameters, starting with $0.
       -i        If the -i option is present, the shell is interactive.
       -l        Make bash act as if it had been invoked as a login shell (see INVOCATION below).
       -r        If the -r option is present, the shell becomes restricted (see RESTRICTED SHELL below).
       -s        If  the  -s option is present, or if no arguments remain after option processing, then commands are read from the standard input.  This option allows the positional parameters to be set when invoking an interactive
                 shell.
       -D        A list of all double-quoted strings preceded by $ is printed on the standard output.  These are the strings that are subject to language translation when the current locale is not C or POSIX.  This implies  the  -n
                 option; no commands will be executed.
       [-+]O [shopt_option]
                 shopt_option  is  one of the shell options accepted by the shopt builtin (see SHELL BUILTIN COMMANDS below).  If shopt_option is present, -O sets the value of that option; +O unsets it.  If shopt_option is not sup‐
                 plied, the names and values of the shell options accepted by shopt are printed on the standard output.  If the invocation option is +O, the output is displayed in a format that may be reused as input.
       --        A -- signals the end of options and disables further option processing.  Any arguments after the -- are treated as filenames and arguments.  An argument of - is equivalent to --.

       Bash also interprets a number of multi-character options.  These options must appear on the command line before the single-character options to be recognized.

       --debugger
              Arrange for the debugger profile to be executed before the shell starts.  Turns on extended debugging mode (see the description of the extdebug option to the shopt builtin below).
       --dump-po-strings
              Equivalent to -D, but the output is in the GNU gettext po (portable object) file format.
       --dump-strings
              Equivalent to -D.
       --help Display a usage message on standard output and exit successfully.
       --init-file file
       --rcfile file
              Execute commands from file instead of the standard personal initialization file ~/.bashrc if the shell is interactive (see INVOCATION below).

       --login
              Equivalent to -l.

       --noediting
              Do not use the GNU readline library to read command lines when the shell is interactive.

       --noprofile
              Do not read either the system-wide startup file /etc/profile or any of the personal initialization files ~/.bash_profile, ~/.bash_login, or ~/.profile.  By default, bash reads these files when it is invoked as a login
              shell (see INVOCATION below).

       --norc Do not read and execute the personal initialization file ~/.bashrc if the shell is interactive.  This option is on by default if the shell is invoked as sh.

       --posix
              Change the behavior of bash where the default operation differs from the POSIX standard to match the standard (posix mode).

       --restricted
              The shell becomes restricted (see RESTRICTED SHELL below).

       --rpm-requires
              Produce  the  list  of files that are required for the shell script to run.  This implies '-n' and is subject to the same limitations as compile time error checking checking; Command substitutions, Conditional expres‐
              sions and eval builtin are not parsed so some dependencies may be missed.

       --verbose
              Equivalent to  -v.

       --version
              Show version information for this instance of bash on the standard output and exit successfully.
OPTIONS
   All of the  single-character shell options documented in the description of the set builtin command can be used as options when the shell is invoked.  In addition, bash interprets the following options when it is invoked:

OPTIONS
All of the single-character shell options documented in the description of the set builtin command can be used as options when the shell is invoked. In addition, bash interprets the following options when it is invoked:

set builtinコマンドの説明に記載されているすべての1文字のシェルオプションは、シェルが呼び出されたときのオプションとして使用できます。さらに、bashは、呼び出されたときに次のオプションを解釈します。

OPTION - 選択、取捨、選択権、選択できるもの、選択肢、(自動車などの)オプション、選択売買権、オプション
https://ejje.weblio.jp/content/OPTION

description - 記述、叙述、描写、(物品・計画などの)説明書、解説(書)、人相書き、種類、タイプ
https://ejje.weblio.jp/content/description

set - (特定の場所に動かないように)置く :、(…を)(…に)置く、据え付ける、立てる、のせる、(ある関係に)位置づける、(部署などに)配置する、(評価として)(…を)(…に)位置づける、(…に)固定する、打ち立てる
https://ejje.weblio.jp/content/set

builtin - はめ込みの、作りつけの、(本来)備わった、生来の
https://ejje.weblio.jp/content/builtin

invoke - 救いを求めて呼びかける、祈る、祈願する、(…を)切願する、念ずる、訴える、頼る、(…を)発動する、実施する、(魔法・呪文によって)呼び出す
https://ejje.weblio.jp/content/invoke

addition - 付加、追加、足し算、寄せ算、付加物、建て増し、増した土地
https://ejje.weblio.jp/content/addition

interpret - (…を)解釈する、説明する、判断する、(…を)理解する、通訳する、(自己の解釈に基づいて)演奏する
https://ejje.weblio.jp/content/interpret

2-1 -c

-c string If the -c option is present, then commands are read from string.  If there are arguments after the string, they are assigned to the positional parameters, starting with $0.

-c string If the -c option is present, then commands are read from string. If there are arguments after the string, they are assigned to the positional parameters, starting with $0.

-c string -cオプションが存在する場合、コマンドはstringから読み取られます。文字列の後に引数がある場合、それらは$ 0から始まる位置パラメーターに割り当てられます。

present - 現在の、現…、今の、今日の、当面の、居合わせて、出席して、参列して、あって、忘れられないで
https://ejje.weblio.jp/content/present

argument - (事実や論理をもとにして行なう)議論、論争、口論、議論、主張、言い争い、(賛否の)論、論拠、論点、言い分
https://ejje.weblio.jp/content/argument

assign - 割り当てる、あてがう、与える、当てる、選任する、選定する、配属する、任命する、命じる、指定する
https://ejje.weblio.jp/content/assign

positional - 位置(上)の、守備(上)の
https://ejje.weblio.jp/content/positional

parameter - 媒介変数、パラメーター、母数、限定要素、要因、制限(範囲)、限界
https://ejje.weblio.jp/content/parameter

2-2 -i

-i        If the -i option is present, the shell is interactive.

-i If the -i option is present, the shell is interactive.

-i -iオプションが存在する場合、シェルは対話型です。

interactive - 相互に作用する、相互作用の
https://ejje.weblio.jp/content/interactive

2-3 -l

-l        Make bash act as if it had been invoked as a login shell (see INVOCATION below).

-l Make bash act as if it had been invoked as a login shell (see INVOCATION below).

-l bashをログインシェルとして呼び出されたかのように動作させます(以下のINVOCATIONを参照)。

act - 行為、行ない、行動(中)、現行、幕、(ショー・サーカスなどの)番組の一つ、一番、一席、見せかけ、ふり
https://ejje.weblio.jp/content/act

login - ログインする
https://ejje.weblio.jp/content/login

INVOCATION - 祈り、祈願、(詩の初めの)詩神の霊感を祈る言葉、悪魔を呼び出す呪文、まじない、(法の)発動、実施
https://ejje.weblio.jp/content/INVOCATION

2-4 -r

-r        If the -r option is present, the shell becomes restricted (see RESTRICTED SHELL below).

-r If the -r option is present, the shell becomes restricted (see RESTRICTED SHELL below).

-r -rオプションが存在する場合、シェルは制限されます(以下の制限付きシェルを参照)。

restricted - (法律によって)制限された、特定の人に限られた、部外秘の、秘密の、狭く閉ざされた、窮屈な
https://ejje.weblio.jp/content/restricted

2-5 -s

-s        If  the  -s option is present, or if no arguments remain after option processing, then commands are read from the standard input.  This option allows the positional parameters to be set when invoking an interactive shell.

-s If the -s option is present, or if no arguments remain after option processing, then commands are read from the standard input. This option allows the positional parameters to be set when invoking an interactive shell.

-sオプションが存在する場合、またはオプション処理後に引数が残っていない場合、コマンドは標準入力から読み取られます。このオプションを使用すると、対話型シェルを呼び出すときに位置パラメータを設定できます。

remain - 残る、残存する、存続する、生き残る、取り残されている、なおすべきである、なお(…が)するべきである、後に残る、後に残って、とどまる
https://ejje.weblio.jp/content/remain

process - 過程、経過、成り行き、進行、(ものを造る)方法、手順、工程、処置、訴訟手続き、令状
https://ejje.weblio.jp/content/process

2-6 -D

-D        A list of all double-quoted strings preceded by $ is printed on the standard output.  These are the strings that are subject to language translation when the current locale is not C or POSIX.  This implies  the  -n option; no commands will be executed.

-D A list of all double-quoted strings preceded by $ is printed on the standard output. These are the strings that are subject to language translation when the current locale is not C or POSIX. This implies the -n option; no commands will be executed.

-D $が前に付いたすべての二重引用符で囲まれた文字列のリストが、標準出力に出力されます。これらは、現在のロケールがCまたはPOSIXでない場合に言語翻訳の対象となる文字列です。これは、-nオプションを意味します。コマンドは実行されません。

precede - (…の)先に立つ、(…を)先導する、(…に)先んずる、(…の)先に起こる、まさる、(…に)優先する、(…を)(…の)前置きとする

2-7 [-+]O [shopt_option]

[-+]O [shopt_option]
             shopt_option  is  one of the shell options accepted by the shopt builtin (see SHELL BUILTIN COMMANDS below).  If shopt_option is present, -O sets the value of that option; +O unsets it.  If shopt_option is not supplied, the names and values of the shell options accepted by shopt are printed on the standard output.  If the invocation option is +O, the output is displayed in a format that may be reused as input.

[-+]O [shopt_option]
shopt_option is one of the shell options accepted by the shopt builtin (see SHELL BUILTIN COMMANDS below). If shopt_option is present, -O sets the value of that option; +O unsets it. If shopt_option is not supplied, the names and values of the shell options accepted by shopt are printed on the standard output. If the invocation option is +O, the output is displayed in a format that may be reused as input.

shopt_optionは、shoptビルトインで受け入れられるシェルオプションの1つです(以下のSHELL BUILTINコマンドを参照)。 shopt_optionが存在する場合、-Oはそのオプションの値を設定します。 + Oはそれを設定解除します。 shopt_optionが指定されていない場合、shoptによって受け入れられたシェルオプションの名前と値が標準出力に出力されます。呼び出しオプションが+ Oの場合、出力は入力として再利用できる形式で表示されます。

supply - 供給する、与える、(…に)供給する、品物を配給する、補充する、埋め合わせる、満たす、応じる、代わって占める
https://ejje.weblio.jp/content/supply

print - 印刷する、印刷して出版する、プリントする、(…に)押しつける、印する、押印する、(…を)捺染(なつせん)する、(…の)模様をつける、焼き付ける、(…を)活字風に書く
https://ejje.weblio.jp/content/print

invocation - 祈り、祈願、(詩の初めの)詩神の霊感を祈る言葉、悪魔を呼び出す呪文、まじない、(法の)発動、実施
https://ejje.weblio.jp/content/invocation

2-8 --

--        A -- signals the end of options and disables further option processing.  Any arguments after the -- are treated as filenames and arguments.  An argument of - is equivalent to --.

-- A -- signals the end of options and disables further option processing. Any arguments after the -- are treated as filenames and arguments. An argument of - is equivalent to --.

-- -- はオプションの終了を通知し、それ以降のオプション処理を無効にします。 -の後の引数は、ファイル名と引数として扱われます。 -の引数は-と同等です。

signal - 信号、合図、(野球の)サイン、(…が)合図、信号機、(鉄道の)シグナル、(…の)きっかけ、導火線、(…が)きっかけ、引き金
https://ejje.weblio.jp/content/signal

disable - 手足などをきかなくする、不具にする、できなくする、(…の)能力をなくさせる、(…が)できなくさせる
https://ejje.weblio.jp/content/disable

further - (距離・空間・時間が)さらに遠く、もっと先に、(程度が)さらに進んで、なおそのうえに、さらにまた
https://ejje.weblio.jp/content/further

treat - (…に)待遇する、取り扱う、(…を)(…と)みなす、(考えのうえで)扱う、(…に)論じる、扱う、述べる、(…で)治療する、手当てする、治療する
https://ejje.weblio.jp/content/treat

equivalent - (価値・数量など)同等の、同価値の、同量の、同意義の、(…と)等価値で、同等で、(…に)相当して、同価の
https://ejje.weblio.jp/content/equivalent

2-9 multi-character options

Bash also interprets a number of multi-character options.  These options must appear on the command line before the single-character options to be recognized.

Bash also interprets a number of multi-character options. These options must appear on the command line before the single-character options to be recognized.

Bashは、いくつかの複数文字オプションも解釈します。これらのオプションは、1文字のオプションが認識される前に、コマンドラインに表示される必要があります。

appear - 姿を見せる、出現する、現われる、(会などに)出席する、(…に)出演する、出頭する、出廷する、世に出る、出る、出ている
https://ejje.weblio.jp/content/appear

line - (細くて強い)綱、ひも、なわ、糸(など)、物干し綱、釣り糸、(測量手・大工などの)測線、線、(点と点とをつなぐ)線、(直)線
https://ejje.weblio.jp/content/line

recognize - (…を)(事実であると)認める、認知する、承認する、(…を)認める、はっきり知る、認める、(以前知っているものと同じだと)わかる、見覚えがある、(見て)思い出す、会釈(えしやく)する
https://ejje.weblio.jp/content/recognize

2-10 --debugger

--debugger
          Arrange for the debugger profile to be executed before the shell starts.  Turns on extended debugging mode (see the description of the extdebug option to the shopt builtin below).

--debugger
Arrange for the debugger profile to be executed before the shell starts. Turns on extended debugging mode (see the description of the extdebug option to the shopt builtin below).

--debugger
シェルが開始する前にデバッガープロファイルが実行されるように調整します。拡張デバッグモードをオンにします(以下のshopt組み込みのextdebugオプションの説明を参照してください)。

Arrange - 整える、整頓(せいとん)する、配列する、配置する、順序立てる、整理する、前もって整える、用意しておく、手配する、準備する
https://ejje.weblio.jp/content/Arrange

debugger - デバッガ
https://ejje.weblio.jp/content/debugger

profile - (人、特に顔の)横顔、プロフィール、(彫像の)半面像、輪郭、外形、(新聞・テレビなどでの)人物紹介、横顔
https://ejje.weblio.jp/content/profile

turn - 回転させる、ぐるぐる回す、回す、ひねる、(…を)回す、栓をひねって出す、つける、栓をひねって止める、消す、体を回転させて行なう
https://ejje.weblio.jp/content/turn

extend - 広げる、拡張する、拡大する、(…に)延長する、延ばす、延長する、拡大解釈する、伸ばす、差し出す、(…に)差し出す
https://ejje.weblio.jp/content/extend

mode - 方法、様式、流儀、(機能上の)形態、モード、(服装・芸術などの)流行(の型)、(動詞の)法、旋法、音階
https://ejje.weblio.jp/content/mode

2-11 --dump-po-strings

--dump-po-strings
          Equivalent to -D, but the output is in the GNU gettext po (portable object) file format.

--dump-po-strings
Equivalent to -D, but the output is in the GNU gettext po (portable object) file format.

--dump-po-strings
-Dと同等ですが、出力はGNU gettext po(ポータブルオブジェクト)ファイル形式です。

portable - 持ち運びできる、携帯用の
https://ejje.weblio.jp/content/portable

object - (知覚できる)物、物体、対象、目的、目標、おかしなもの、目的語、客観、客体
https://ejje.weblio.jp/content/object

2-12 --dump-strings

--dump-strings
          Equivalent to -D.

--dump-strings
Equivalent to -D.

--dump-strings
-Dと同等です。

2-13 --help

--help Display a usage message on standard output and exit successfully.

--help Display a usage message on standard output and exit successfully.

--help 標準出力に使用法メッセージを表示し、正常に終了します。

Display - 展示する、陳列する、飾る、表に出す、発揮する、(…を)見せる、広げる
https://ejje.weblio.jp/content/Display

usage - 使うこと、使用、利用、使用法、用い方、取り扱い(方)、(言語の)慣用法、語法、慣習、慣行
https://ejje.weblio.jp/content/usage

実行例

[root@sandbox ~]# bash --help
GNU bash, バージョン 4.2.46(2)-release-(x86_64-redhat-linux-gnu)
使用法: bash [GNU long option] [option] ...
        bash [GNU long option] [option] script-file ...
GNU 形式の長いオプション:
        --debug
        --debugger
        --dump-po-strings
        --dump-strings
        --help
        --init-file
        --login
        --noediting
        --noprofile
        --norc
        --posix
        --protected
        --rcfile
        --rpm-requires
        --restricted
        --verbose
        --version
シェルオプション:
        -irsD または -c command または -O shopt_option          (起動時のみ)
        -abefhkmnptuvxBCHP または -o option
シェルオプションの詳細については `bash -c "help set"'と入力してください。
シェル組み込みコマンドについては `bash -c help' と入力してください。

bash -c "help set"

[root@sandbox ~]$ bash -c "help set"
set: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
    Set or unset values of shell options and positional parameters.

    Change the value of shell attributes and positional parameters, or
    display the names and values of shell variables.

    Options:
      -a  Mark variables which are modified or created for export.
      -b  Notify of job termination immediately.
      -e  Exit immediately if a command exits with a non-zero status.
      -f  Disable file name generation (globbing).
      -h  Remember the location of commands as they are looked up.
      -k  All assignment arguments are placed in the environment for a
          command, not just those that precede the command name.
      -m  Job control is enabled.
      -n  Read commands but do not execute them.
      -o option-name
          Set the variable corresponding to option-name:
              allexport    same as -a
              braceexpand  same as -B
              emacs        use an emacs-style line editing interface
              errexit      same as -e
              errtrace     same as -E
              functrace    same as -T
              hashall      same as -h
              histexpand   same as -H
              history      enable command history
              ignoreeof    the shell will not exit upon reading EOF
              interactive-comments
                           allow comments to appear in interactive commands
              keyword      same as -k
              monitor      same as -m
              noclobber    same as -C
              noexec       same as -n
              noglob       same as -f
              nolog        currently accepted but ignored
              notify       same as -b
              nounset      same as -u
              onecmd       same as -t
              physical     same as -P
              pipefail     the return value of a pipeline is the status of
                           the last command to exit with a non-zero status,
                           or zero if no command exited with a non-zero status
              posix        change the behavior of bash where the default
                           operation differs from the Posix standard to
                           match the standard
              privileged   same as -p
              verbose      same as -v
              vi           use a vi-style line editing interface
              xtrace       same as -x
      -p  Turned on whenever the real and effective user ids do not match.
          Disables processing of the $ENV file and importing of shell
          functions.  Turning this option off causes the effective uid and
          gid to be set to the real uid and gid.
      -t  Exit after reading and executing one command.
      -u  Treat unset variables as an error when substituting.
      -v  Print shell input lines as they are read.
      -x  Print commands and their arguments as they are executed.
      -B  the shell will perform brace expansion
      -C  If set, disallow existing regular files to be overwritten
          by redirection of output.
      -E  If set, the ERR trap is inherited by shell functions.
      -H  Enable ! style history substitution.  This flag is on
          by default when the shell is interactive.
      -P  If set, do not follow symbolic links when executing commands
          such as cd which change the current directory.
      -T  If set, the DEBUG trap is inherited by shell functions.
      --  Assign any remaining arguments to the positional parameters.
          If there are no remaining arguments, the positional parameters
          are unset.
      -   Assign any remaining arguments to the positional parameters.
          The -x and -v options are turned off.

    Using + rather than - causes these flags to be turned off.  The
    flags can also be used upon invocation of the shell.  The current
    set of flags may be found in $-.  The remaining n ARGs are positional
    parameters and are assigned, in order, to $1, $2, .. $n.  If no
    ARGs are given, all shell variables are printed.

    Exit Status:
    Returns success unless an invalid option is given.

bash -c help

[rooot@sandbox ~]$ bash -c help
GNU bash, バージョン 4.2.46(2)-release (x86_64-redhat-linux-gnu)
これらのシェルコマンドは内部で定義されています。`help' と入力して一覧を参照してください。
`help 名前' と入力すると `名前' という関数のより詳しい説明が得られます。
'info bash' を使用するとシェル全般のより詳しい説明が得られます。
`man -k' または info を使用すると一覧にないコマンドのより詳しい説明が得られます。

名前の後にアスタリスク (*) がある場合はそのコマンドが無効になっていることを意味します。

 job_spec [&]                            history [-c] [-d offset] [n] また秕
 (( expression ))                        if COMMANDS; then COMMANDS; [ elif C>
 . filename [arguments]                  jobs [-lnprs] [jobspec ...] また秕
 :                                       kill [-s sigspec | -n signum | -sigs>
 [ arg... ]                              let 引数 [引数 ...]
 [[ expression ]]                        local [option] name[=value] ...
 alias [-p] [name[=value] ... ]          logout [n]
 bg [job_spec ...]                       mapfile [-n count] [-O origin] [-s c>
 bind [-lpvsPVS] [-m keymap] [-f filen>  popd [-n] [+N | -N]
 break [n]                               printf [-v var] format [arguments]
 builtin [shell-builtin [arg ...]]       pushd [-n] [+N | -N | dir]
 caller [expr]                           pwd [-LP]
 case WORD in [PATTERN [| PATTERN]...)>  read [-ers] [-a array] [-d delim] [->
 cd [-L|[-P [-e]]] [dir]                 readarray [-n count] [-O origin] [-s>
 command [-pVv] command [arg ...]        readonly [-aAf] [name[=value] ...] o>
 compgen [-abcdefgjksuv] [-o option]  >  return [n]
 complete [-abcdefgjksuv] [-pr] [-DE] >  select NAME [in WORDS ... ;] do COMM>
 compopt [-o|+o option] [-DE] [name ..>  set [-abefhkmnptuvxBCHP] [-o option->
 continue [n]                            shift [n]
 coproc [NAME] command [redirections]    shopt [-pqsu] [-o] [optname ...]
 declare [-aAfFgilrtux] [-p] [name[=va>  source filename [arguments]
 dirs [-clpv] [+N] [-N]                  suspend [-f]
 disown [-h] [-ar] [jobspec ...]         test [expr]
 echo [-neE] [arg ...]                   time [-p] pipeline
 enable [-a] [-dnps] [-f filename] [na>  times
 eval [arg ...]                          trap [-lp] [[arg] signal_spec ...]
 exec [-cl] [-a name] [command [argume>  true
 exit [n]                                type [-afptP] name [name ...]
 export [-fn] [name[=value] ...] ま秕  typeset [-aAfFgilrtux] [-p] name[=va>
 false                                   ulimit [-SHacdefilmnpqrstuvx] [limit>
 fc [-e ename] [-lnr] [first] [last] 秕  umask [-p] [-S] [mode]
 fg [job_spec]                           unalias [-a] name [name ...]
 for NAME [in WORDS ... ] ; do COMMAND>  unset [-f] [-v] [name ...]
 for (( exp1; exp2; exp3 )); do COMMAN>  until COMMANDS; do COMMANDS; done
 function name { COMMANDS ; } また秕  変数 - 変数の名前とその意>
 getopts optstring name [arg]            wait [id]
 hash [-lr] [-p pathname] [-dt] [name >  while COMMANDS; do COMMANDS; done
 help [-dms] [pattern ...]               { COMMANDS ; }

2-14 --init-file file --rcfile file

--init-file file
--rcfile file
Execute commands from file instead of the standard personal initialization file ~/.bashrc if the shell is interactive (see INVOCATION below).

--init-file file
--rcfile file
Execute commands from file instead of the standard personal initialization file ~/.bashrc if the shell is interactive (see INVOCATION below).

--init-file file
--rcfile file
シェルが対話型の場合は、標準の個人用初期化ファイル〜/ .bashrcではなくファイルからコマンドを実行します(以下のINVOCATIONを参照)。

2-15 --login

--login
Equivalent to -l.

--login
Equivalent to -l.

--login -lと同等です。

2-16 --noediting

--noediting
          Do not use the GNU readline library to read command lines when the shell is interactive.

--noediting
Do not use the GNU readline library to read command lines when the shell is interactive.

--noediting
シェルが対話型の場合は、GNU readlineライブラリを使用してコマンドラインを読み取らないでください。

2-17 --noprofile

--noprofile
   Do not read either the system-wide startup file /etc/profile or any of the personal initialization files ~/.bash_profile, ~/.bash_login, or ~/.profile.  By default, bash reads these files when it is invoked as a login shell (see INVOCATION below).

--noprofile
Do not read either the system-wide startup file /etc/profile or any of the personal initialization files ~/.bash_profile, ~/.bash_login, or ~/.profile. By default, bash reads these files when it is invoked as a login shell (see INVOCATION below).

--noprofile
システム全体のスタートアップファイル/ etc / profileまたは個人用初期化ファイル〜/ .bash_profile、〜/ .bash_login、または〜/ .profileのいずれも読み取らないでください。デフォルトでは、bashはログインシェルとして呼び出されたときにこれらのファイルを読み取ります(以下のINVOCATIONを参照)。

2-18 --norc

--norc Do not read and execute the personal initialization file ~/.bashrc if the shell is interactive.  This option is on by default if the shell is invoked as sh.

--norc Do not read and execute the personal initialization file ~/.bashrc if the shell is interactive. This option is on by default if the shell is invoked as sh.

--norcシェルが対話型の場合、個人用初期化ファイル〜/ .bashrcを読み取って実行しないでください。シェルがshとして呼び出された場合、このオプションはデフォルトでオンになっています。

2-19 --posix

--posix
          Change the behavior of bash where the default operation differs from the POSIX standard to match the standard (posix mode).

--posix
Change the behavior of bash where the default operation differs from the POSIX standard to match the standard (posix mode).

--posix
デフォルトの操作がPOSIX標準と異なるbashの動作を、標準に一致するように変更します(posixモード)。

2-20 --restricted

--restricted
          The shell becomes restricted (see RESTRICTED SHELL below).

--restricted
The shell becomes restricted (see RESTRICTED SHELL below).

--restricted
シェルが制限されます(以下の制限付きシェルを参照)。

2-20 --rpm-requires

--rpm-requires
          Produce  the  list  of files that are required for the shell script to run.  This implies '-n' and is subject to the same limitations as compile time error checking checking; Command substitutions, Conditional expressions and eval builtin are not parsed so some dependencies may be missed.

--rpm-requires
Produce the list of files that are required for the shell script to run. This implies '-n' and is subject to the same limitations as compile time error checking checking; Command substitutions, Conditional expressions and eval builtin are not parsed so some dependencies may be missed.

--rpm-requires

--rpm-必須
シェルスクリプトの実行に必要なファイルのリストを作成します。これは「-n」を意味し、コンパイル時のエラーチェックチェックと同じ制限が適用されます。コマンド置換、条件式、およびevalビルトインは解析されないため、一部の依存関係が失われる可能性があります。

Produce - 産する、生ずる、製造する、生産する、作り出す、描く、作る、生む、産む、生じさせる
https://ejje.weblio.jp/content/Produce

subject - (議論・研究などの)主題、問題、題目、題材、画題、(写真の)被写体、(学校の)学科、科目、主語、主部
https://ejje.weblio.jp/content/subject

substitution - 代理、代用、(語の)代用
https://ejje.weblio.jp/content/substitution

2-21 --verbose

--verbose
          Equivalent to  -v.

--verbose
Equivalent to -v.

--verbose
-vと同等です。

verbose - 言葉数の多い、多弁の、くどい、冗長な
https://ejje.weblio.jp/content/verbose

2-22 --version

--version
          Show version information for this instance of bash on the standard output and exit successfully.

--version
Show version information for this instance of bash on the standard output and exit successfully.

-- version
このbashのインスタンスのバージョン情報を標準出力に表示し、正常に終了します。

instance - 例、実例、事例、実証、場合、事実、段階

3 ARGUMENTS

ARGUMENTS
       If arguments remain after option processing, and neither the -c nor the -s option has been supplied, the first argument is assumed to be the name of a file containing shell commands.  If bash is invoked in this fashion, $0 is set to the name of the file, and the positional parameters are set to the remaining arguments.  Bash reads and executes commands from this file, then exits.  Bash's exit status is the exit status of the last command executed in the script.  If no commands are executed, the exit status is 0.  An attempt is first made to open the file in the current directory, and, if no file is found, then the shell searches the directories in PATH for the script.

ARGUMENTS
If arguments remain after option processing, and neither the -c nor the -s option has been supplied, the first argument is assumed to be the name of a file containing shell commands. If bash is invoked in this fashion, $0 is set to the name of the file, and the positional parameters are set to the remaining arguments. Bash reads and executes commands from this file, then exits. Bash's exit status is the exit status of the last command executed in the script. If no commands are executed, the exit status is 0. An attempt is first made to open the file in the current directory, and, if no file is found, then the shell searches the directories in PATH for the script.

引数
オプション処理後に引数が残り、-cオプションも-sオプションも指定されていない場合、最初の引数はシェルコマンドを含むファイルの名前であると見なされます。この方法でbashが呼び出されると、ファイルの名前に$ 0が設定され、残りの引数に位置パラメーターが設定されます。 Bashはこのファイルからコマンドを読み取って実行し、終了します。 Bashの終了ステータスは、スクリプトで最後に実行されたコマンドの終了ステータスです。コマンドが実行されない場合、終了ステータスは0です。最初に現在のディレクトリでファイルを開こうとします。ファイルが見つからない場合、シェルはPATH内のディレクトリでスクリプトを検索します。

argument - (事実や論理をもとにして行なう)議論、論争、口論、議論、主張、言い争い、(賛否の)論、論拠、論点、言い分

assume - (証拠はないが)(…を)事実だとする当然のことと思う、思いこむ、決めてかかる、当然思う、推測する、(…が)当然思う、(…と)仮定して、(…が)(…と)仮定して、とる、引き受ける

fashion - 仕方、流儀、…風、…流に、…のように、(服装・風習などの)流行、はやり(の型)、時の好み、流行の様式、(服などの)ファッション

4 INVOCATION

INVOCATION
       A login shell is one whose first character of argument zero is a -, or one started with the --login option.

       An  interactive shell is one started without non-option arguments and without the -c option whose standard input and error are both connected to terminals (as determined by isatty(3)), or one started with the -i option.  PS1 is set and $- includes i if bash is interactive, allowing a shell script or a startup file to test this state.

       The following paragraphs describe how bash executes its startup files.  If any of the files exist but cannot be read, bash reports an error.  Tildes are expanded in file names as described below under Tilde Expansion in  the EXPANSION section.

       When  bash  is  invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists.  After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.  The --noprofile option may be  used  when  the  shell  is  started  to inhibit this behavior.

       When a login shell exits, bash reads and executes commands from the files ~/.bash_logout and /etc/bash.bash_logout, if the files exists.

       When  an  interactive  shell that is not a login shell is started, bash reads and executes commands from ~/.bashrc, if that file exists.  This may be inhibited by using the --norc option.  The --rcfile file option will force bash to read and execute commands from file instead of ~/.bashrc.

       When bash is started non-interactively, to run a shell script, for example, it looks for the variable BASH_ENV in the environment, expands its value if it appears there, and uses the expanded value as the name of a  file  to  read and execute.  Bash behaves as if the following command were executed:
              if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi
       but the value of the PATH variable is not used to search for the file name.

       If bash is invoked with the name sh, it tries to mimic the startup behavior of historical versions of sh as closely as possible, while conforming to the POSIX standard as well.  When invoked as an interactive login shell, or a non-interactive shell with the --login option, it first attempts to read and execute commands from /etc/profile and ~/.profile, in that order.  The --noprofile option may be used to inhibit this behavior.  When invoked  as an interactive shell with the name sh, bash looks for the variable ENV, expands its value if it is defined, and uses the expanded value as the name of a file to read and execute.  Since a shell invoked as sh does not attempt to read and execute commands from any other startup files, the --rcfile option has no effect.  A non-interactive shell invoked with the name sh does not attempt to read any other startup files.   When  invoked  as  sh,  bash enters posix mode after the startup files are read.

       When  bash is started in posix mode, as with the --posix command line option, it follows the POSIX standard for startup files.  In this mode, interactive shells expand the ENV variable and commands are read and executed from the file whose name is the expanded value.  No other startup files are read.

       Bash attempts to determine when it is being run with its standard input connected to a network connection, as when executed by the remote shell daemon, usually rshd, or the secure shell daemon sshd.  If bash determines it is being  run in this fashion, it reads and executes commands from ~/.bashrc, if that file exists and is readable.  It will not do this if invoked as sh.  The --norc option may be used to inhibit this behavior, and the --rcfile option may be used to force another file to be read, but rshd does not generally invoke the shell with those options or allow them to be specified.

       If the shell is started with the effective user (group) id not equal to the real user (group) id, and the -p option is not supplied, no startup files are read, shell functions are not  inherited  from  the  environment,  the SHELLOPTS,  BASHOPTS,  CDPATH, and GLOBIGNORE variables, if they appear in the environment, are ignored, and the effective user id is set to the real user id.  If the -p option is supplied at invocation, the startup behavior is the same, but the effective user id is not reset.
INVOCATION
   A login shell is one whose first character of argument zero is a -, or one started with the --login option.

呼び出し
ログインシェルは、引数0の最初の文字が-であるシェル、または--loginオプションで始まるシェルです。

INVOCATION - 祈り、祈願、(詩の初めの)詩神の霊感を祈る言葉、悪魔を呼び出す呪文、まじない、(法の)発動、実施
https://ejje.weblio.jp/content/INVOCATION

An  interactive shell is one started without non-option arguments and without the -c option whose standard input and error are both connected to terminals (as determined by isatty(3)), or one started with the -i option.  PS1 is set and $- includes i if bash is interactive, allowing a shell script or a startup file to test this state.

対話型シェルは、オプション以外の引数なしで、標準入力とエラーの両方が端末に接続されている-cオプションなしで開始されたシェル(isatty(3)で決定)、または-iオプションで開始されたシェルです。 PS1が設定され、bashがインタラクティブである場合は$-にiが含まれ、シェルスクリプトまたは起動ファイルでこの状態をテストできます。

isatty - ファイルディスクリプターが端末を参照しているかをチェックする
https://linuxjm.osdn.jp/html/LDP_man-pages/man3/isatty.3.html

The following paragraphs describe how bash executes its startup files.  If any of the files exist but cannot be read, bash reports an error.  Tildes are expanded in file names as described below under Tilde Expansion in  the EXPANSION section.

The following paragraphs describe how bash executes its startup files. If any of the files exist but cannot be read, bash reports an error. Tildes are expanded in file names as described below under Tilde Expansion in the EXPANSION section.

次の段落では、bashが起動ファイルを実行する方法について説明します。いずれかのファイルが存在するが読み取ることができない場合、bashはエラーを報告します。チルダは、以下の「拡張」セクションの「チルダ拡張」で説明されているように、ファイル名で拡張されます。

paragraphs - (文章の)節、段落、パラグラフ、(新聞・雑誌の)小記事、小論説、短評
https://ejje.weblio.jp/content/paragraph

Tilde - ティルデ、ティルド
https://ejje.weblio.jp/content/Tilde

expansion - 拡大、拡張、発展、膨張、伸張、展開、拡大されたもの、展開式
https://ejje.weblio.jp/content/expansion

When  bash  is  invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists.  After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.  The --noprofile option may be  used  when  the  shell  is  started  to inhibit this behavior.

When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior.

bashが対話型ログインシェルとして、または--loginオプションを指定した非対話型シェルとして呼び出されると、最初にファイル/ etc / profile(ファイルが存在する場合)からコマンドを読み取って実行します。そのファイルを読み取った後、〜/ .bash_profile、〜/ .bash_login、〜/ .profileの順に検索し、最初に存在して読み取り可能なコマンドからコマンドを読み取って実行します。 --noprofileオプションは、シェルの起動時にこの動作を禁止するために使用できます。

When  a  login  shell  exits, bash reads and executes commands from the files ~/.bash_logout and /etc/bash.bash_logout, if the files exists.

When a login shell exits, bash reads and executes commands from the files ~/.bash_logout and /etc/bash.bash_logout, if the files exists.

ログインシェルが終了すると、bashはファイル〜/ .bash_logoutおよび/etc/bash.bash_logout(ファイルが存在する場合)からコマンドを読み取って実行します。

When  an  interactive  shell that is not a login shell is started, bash reads and executes commands from ~/.bashrc, if that file exists.  This may be inhibited by using the --norc option.  The --rcfile file option will force bash to read and execute commands from file instead of ~/.bashrc.

When an interactive shell that is not a login shell is started, bash reads and executes commands from ~/.bashrc, if that file exists. This may be inhibited by using the --norc option. The --rcfile file option will force bash to read and execute commands from file instead of ~/.bashrc.

ログインシェルではない対話型シェルが開始されると、bashは〜/ .bashrcからコマンドを読み取り、実行します(そのファイルが存在する場合)。これは、-norcオプションを使用することで禁止できます。 --rcfile fileオプションは、bashに〜/ .bashrcではなくファイルからコマンドを読み取って実行するように強制します。

When bash is started non-interactively, to run a shell script, for example, it looks for the variable BASH_ENV in the environment, expands its value if it appears there, and uses the expanded value as the name of a  file  to  read and execute.  Bash behaves as if the following command were executed:
          if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi
 but the value of the PATH variable is not used to search for the file name.

When bash is started non-interactively, to run a shell script, for example, it looks for the variable BASH_ENV in the environment, expands its value if it appears there, and uses the expanded value as the name of a file to read and execute. Bash behaves as if the following command were executed:

bashが非対話的に開始されると、たとえばシェルスクリプトを実行するために、環境内で変数BASH_ENVを検索し、そこに表示されている場合はその値を展開し、展開された値を読み取りおよび実行するファイルの名前として使用します。 Bashは、次のコマンドが実行されたかのように動作します。

              if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi

but the value of the PATH variable is not used to search for the file name.

ただし、PATH変数の値は、ファイル名の検索には使用されません。

If bash is invoked with the name sh, it tries to mimic the startup behavior of historical versions of sh as closely as possible, while conforming to the POSIX standard as well.  When invoked as an interactive login shell, or a non-interactive shell with the --login option, it first attempts to read and execute commands from /etc/profile and ~/.profile, in that order.  The --noprofile option may be used to inhibit this behavior.  When invoked  as an interactive shell with the name sh, bash looks for the variable ENV, expands its value if it is defined, and uses the expanded value as the name of a file to read and execute.  Since a shell invoked as sh does not attempt to read and execute commands from any other startup files, the --rcfile option has no effect.  A non-interactive shell invoked with the name sh does not attempt to read any other startup files.   When  invoked  as  sh,  bash enters posix mode after the startup files are read.

If bash is invoked with the name sh, it tries to mimic the startup behavior of historical versions of sh as closely as possible, while conforming to the POSIX standard as well. When invoked as an interactive login shell, or a non-interactive shell with the --login option, it first attempts to read and execute commands from /etc/profile and ~/.profile, in that order. The --noprofile option may be used to inhibit this behavior. When invoked as an interactive shell with the name sh, bash looks for the variable ENV, expands its value if it is defined, and uses the expanded value as the name of a file to read and execute. Since a shell invoked as sh does not attempt to read and execute commands from any other startup files, the --rcfile option has no effect. A non-interactive shell invoked with the name sh does not attempt to read any other startup files. When invoked as sh, bash enters posix mode after the startup files are read.

bashがshという名前で呼び出された場合、POSIX標準にも準拠しながら、shの履歴バージョンの起動動作を可能な限り模倣しようとします。対話型ログインシェル、または--loginオプションを指定した非対話型シェルとして呼び出されると、最初に/ etc / profileおよび〜/ .profileからコマンドをこの順序で読み取って実行しようとします。 --noprofileオプションを使用して、この動作を禁止できます。 shという名前の対話型シェルとして呼び出されると、bashは変数ENVを検索し、定義されている場合はその値を展開し、展開された値を読み取りおよび実行するファイルの名前として使用します。 shとして呼び出されたシェルは、他のスタートアップファイルからコマンドを読み取って実行しようとしないため、-rcfileオプションは効果がありません。 shという名前で呼び出された非対話型シェルは、他のスタートアップファイルを読み取ろうとしません。 shとして呼び出されると、bashはスタートアップファイルが読み取られた後にposixモードに入ります。

mimic - (笑わせるために)まねる、まねしてばかにする、(…に)似る、擬態する
https://ejje.weblio.jp/content/mimic

When  bash is started in posix mode, as with the --posix command line option, it follows the POSIX standard for startup files.  In this mode, interactive shells expand the ENV variable and commands are read and executed from the file whose name is the expanded value.  No other startup files are read.

When bash is started in posix mode, as with the --posix command line option, it follows the POSIX standard for startup files. In this mode, interactive shells expand the ENV variable and commands are read and executed from the file whose name is the expanded value. No other startup files are read.

--posixコマンドラインオプションのように、bashがposixモードで開始されると、起動ファイルのPOSIX標準に従います。このモードでは、対話型シェルがENV変数を展開し、展開された値が名前のファイルからコマンドが読み取られて実行されます。他のスタートアップファイルは読み込まれません。

Bash attempts to determine when it is being run with its standard input connected to a network connection, as when executed by the remote shell daemon, usually rshd, or the secure shell daemon sshd.  If bash determines it is being  run in this fashion, it reads and executes commands from ~/.bashrc, if that file exists and is readable.  It will not do this if invoked as sh.  The --norc option may be used to inhibit this behavior, and the --rcfile option may be used to force another file to be read, but rshd does not generally invoke the shell with those options or allow them to be specified.

Bash attempts to determine when it is being run with its standard input connected to a network connection, as when executed by the remote shell daemon, usually rshd, or the secure shell daemon sshd. If bash determines it is being run in this fashion, it reads and executes commands from ~/.bashrc, if that file exists and is readable. It will not do this if invoked as sh. The --norc option may be used to inhibit this behavior, and the --rcfile option may be used to force another file to be read, but rshd does not generally invoke the shell with those options or allow them to be specified.

Bashは、リモートシェルデーモン(通常はrshd)またはセキュアシェルデーモンsshdによって実行される場合のように、標準入力がネットワーク接続に接続された状態で実行されているかどうかを判断しようとします。 bashがこの方法で実行されていると判断した場合、そのファイルが存在し、読み取り可能であれば、〜/ .bashrcからコマンドを読み取って実行します。 shとして呼び出された場合、これは実行されません。 --norcオプションを使用してこの動作を禁止したり、-rcfileオプションを使用して別のファイルを強制的に読み取ったりすることができますが、rshdは通常、これらのオプションを使用してシェルを呼び出したり、指定したりすることはありません。

If the shell is started with the effective user (group) id not equal to the real user (group) id, and the -p option is not supplied, no startup files are read, shell functions are not  inherited  from  the  environment,  the SHELLOPTS,  BASHOPTS,  CDPATH, and GLOBIGNORE variables, if they appear in the environment, are ignored, and the effective user id is set to the real user id.  If the -p option is supplied at invocation, the startup behavior is the same, but the effective user id is not reset.

If the shell is started with the effective user (group) id not equal to the real user (group) id, and the -p option is not supplied, no startup files are read, shell functions are not inherited from the environment, the SHELLOPTS, BASHOPTS, CDPATH, and GLOBIGNORE variables, if they appear in the environment, are ignored, and the effective user id is set to the real user id. If the -p option is supplied at invocation, the startup behavior is the same, but the effective user id is not reset.

シェルが実際のユーザー(グループ)IDと等しくない有効なユーザー(グループ)IDで開始され、-pオプションが指定されていない場合、起動ファイルは読み取られず、シェル関数は環境から継承されません。SHELLOPTS 、BASHOPTS、CDPATH、およびGLOBIGNORE変数は、環境に表示されている場合は無視され、実効ユーザーIDは実際のユーザーIDに設定されます。呼び出し時に-pオプションが指定されている場合、起動時の動作は同じですが、有効なユーザーIDはリセットされません。

5 DEFINITIONS

DEFINITIONS
       The  following  definitions  are used throughout the rest of this document.
       blank  A space or tab.
       word   A sequence of characters considered as  a  single  unit  by  the shell.  Also known as a token.
       name   A  word  consisting  only  of alphanumeric characters and underscores, and beginning with an alphabetic character or an  underscore.  Also referred to as an identifier.
       metacharacter
              A  character  that,  when unquoted, separates words.  One of the following:
              |  & ; ( ) < > space tab
       control operator
              A token that performs a control function.  It is one of the following symbols:
              || & && ; ;; ( ) | |& <newline>
DEFINITIONS
   The  following  definitions  are used throughout the rest of this document.

DEFINITIONS
The following definitions are used throughout the rest of this document.

定義
以下の定義は、このドキュメントの残りの部分で使用されます。

  blank  A space or tab.

blank A space or tab.

blank
スペースまたはタブ。

word   A sequence of characters considered as  a  single  unit  by  the shell.  Also known as a token.

word A sequence of characters considered as a single unit by the shell. Also known as a token.

word
シェルによって単一の単位と見なされる文字のシーケンス。トークンとも呼ばれます。

name   A  word  consisting  only  of alphanumeric characters and underscores, and beginning with an alphabetic character or an  underscore.  Also referred to as an identifier.

name A word consisting only of alphanumeric characters and underscores, and beginning with an alphabetic character or an underscore. Also referred to as an identifier.

name
英数字とアンダースコアのみで構成され、アルファベット文字またはアンダースコアで始まる単語。識別子とも呼ばれます。

metacharacter
          A  character  that,  when unquoted, separates words.  One of the following:
          |  & ; ( ) < > space tab

metacharacter
A character that, when unquoted, separates words. One of the following:
| & ; ( ) < > space tab

metacharacter
引用符で囲まれていない場合に単語を区切る文字。次のいずれか:
| &; ()<> スペース タブ

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?