概要
Built In Command
詳細
シェルにもともと組み込まれているコマンド=Built In Command。
typeコマンドによって確認ができる。
xx is a shell builtin
と表示されればBuilt In Command。
Built In Commandの例
:(コロン)
何も処理をしない
$ type : : is a shell builtin
typeコマンドを実行すると:もコマンドとして認識されていることが分かる。
あまりシェルに習熟していない私は:についてはじめて知った
sourceもしくは.(ピリオド)
シェルスクリプトを読み込んで実行。
sourceも.も同じ結果になる。
read
標準入力から1行読み取り変数に格納
$ read hoge;echo $hoge hoge!!! hoge!!!
サンプル
$ type cd cd is a shell builtin $ type tree tree is /usr/bin/tree