0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

コマンドとシェルスクリプトについて

Posted at

コマンドはどのように実行されるか

  • ユーザーが入力したコマンド文字列を受け取る
  • コマンド処理が記述されたファイルを探す
  • 該当コマンドを実行

この「コマンド処理が記述されたファイルを探す」プロセスでシェルが必要となる。

代表的なシェルとしてはbashやzshが挙げられる。

つまり、コマンドを実行するためにはbashやzshといったシェルに文字列を打ち込み、

実行しなければいけない。

補足

必ずシェルにコマンド文字列を打ち込まなければ実行できないかのように記載したが、例外も存在する。

例えば、通常.sh形式で保存されるシェルスクリプトファイルを実行すれば、

ユーザーは一つ一つコマンドを打ち込むことなく実行することができる。

ターミナルとシェルの違い

ターミナルはコマンド文字列を受け取り、シェルはその文字列を解釈してOSに伝える役割を果たす。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?