Lullar    


ビデオジャパンは、最大でランク。

シェル Shell

提供: フリー百科事典『ウィキペディア(Wikipedia)』 Provides: Encyclopedia material may be challenged Wikipedia (Wikipedia) 』

Bashのスクリーンショット Bash Screenshot

シェル (shell) はオペレーティングシステム (OS) の機能の一部であり、ユーザーからの指示を受けて解釈し、プログラムの起動や制御などを行うプログラムである。 Shell (shell) is the operating system (OS) is part of the function of interpreting the instructions received from the user, such as a program to start and control program.

目次 Contents

[ 編集 ] 概要 Summary

シェル(殻)という名称は、OSの機能を実装している中心核部分( カーネル )の外層として動作することからきている。 Shell (Shell) is called, OS core part that implements the function (kernel) has to come from the outer layer of work. 通常、シェルはコマンドラインインタフェース ( CUI ) を持つが、 グラフィカルユーザインタフェース (GUI) を持つものは特にグラフィカル・シェルと呼ぶ。 Typically, the shell command line interface (CUI) that have a graphical user interface (GUI) that is called with a particular graphical shell.

シェルはUNIXで使用される呼称であり、より一般的にはコマンドインタプリタと呼ぶ。 Shell is a UNIX is a designation used by, more commonly referred to as interpreter command. しかしUNIXの普及やMS-DOSなど他のOSでも使用されたことにより現在では一般的な名称となっている。 But the spread of UNIX and MS-DOS and other OS currently used by any name has become common. ただし通常「シェル」と言った場合はPOSIX系のオペレーティングシステムにおけるシェルを指すことが多い。 But usually the "shell" if he is a POSIX shell is often pointed to in the operating systems. 一方「コマンドインタプリタ」の名称で呼ばれる場合は単に「コマンドを解釈する者」の意であり、OSのユーザインタフェースとしての意味合いは失われていることが多い。 The "Command Interpreter" If the name is simply called "The command to interpret the" meaning of is, OS meaning of a user interface that is often lost.

UNIXライクなオペレーティングシステムではシェルがユーザプログラムとして実装されており、また好きなシェルを差し替えて使用することができ、このことはUNIX発表当時においてはUNIXの特徴の一つとなっていた。 UNIX-like operating system has been implemented as a shell user program can be used to replace these with your favorite shell, this is the UNIX UNIX was released in time become one of the features.

同様の名前で、LEDモジュール製品名に使われている。 In a similar name, LED modules are used in the product name. これらはOSなどとは一切の関係はない。 These are the OS is not like any relationship.

[ 編集 ] シェルの機能 Shell function

一般的なシェルの機能は以下のとおり(すべてのシェルが装備しているわけではない)。 General features of the shell as follows (not all that is not equipped with a shell).

  • プログラム名(プログラム出力)を指定してアプリケーションを起動する。 Program Name (program output) to start the application you specify.
  • プログラムを終了する、フォアグラウンド・バックグラウンドを切り替える(ジョブコントロール)。 Exit the program, change the foreground background (job control).
  • プログラムの出力をファイルに出力する(リダイレクト)、他のプログラムの入力とする(パイプ)。 Program to output to the output file (redirection), and other programs and input (pipe).
  • プログラムの動作環境の設定に使用する環境変数 、シェル変数の設定・参照。 Used to set the environment variable environmental behavior of the program, see the shell variable settings.
  • 入力コマンドライン中の特別な記法で指定した部分をファイル名としてパターンマッチさせて展開する機能(ワイルドカードの展開)。 Ability to deploy them as a filename pattern to match a specified portion of a special notation in the command line input (expansion of wildcards).
  • 入力履歴を呼び出す(コマンド入力ヒストリ)。 Call the input history (command input history).
  • コマンドに別名をつける(エイリアス)。 Give the alias command (alias).
  • 繰り返しコマンドを実行したり、条件に応じて実行させたりするための制御構造。 Repeat command or control structure for the condition or if it runs.
  • 入力時のファイル名などの補完機能 Such as file name completion when entering
  • まとまった一連の入力をシェルスクリプトとして実行する。 Script to run as a shell to enter a series of coherent. バッチ処理とも呼ばれる。 Also called batch processing.

[ 編集 ] シェルスクリプト Shell script

シェルの特徴は、コマンドラインの指示のための変数や制御構造を持っており、ある種のプログラミング言語と呼べる。 Characteristics of the shell has a variable and control structure for the command line instructions, and to call certain programming language. たとえば、複数のファイルに対する処理をBourne Shellでは以下のように記述できる。 For example, the processing of multiple files Bourne Shell does can be described as follows.

このシェルスクリプトはカレントディレクトリー上の.txtというサフィックスを持つファイルのバックアップを作る。 This shell script on the current directory. Txt files make a backup with the suffix.

#!/bin/sh #! / bin / sh
for file in * .txt for file in *. txt
do do
    cp " $file " " $file .bak" cp "$ file" "$ file. bak"
done done

このような処理はコマンドラインとして入力することもできるが、ファイルに保存してシェルスクリプトとして実行することができる。 These processes can also be entered as a command-line shell script can be executed to save the file.

[ 編集 ] UNIX/Linuxにおけるシェル UNIX / Linux shell in

[ 編集 ] DOS/Windows環境のシェル DOS / Windows shell environment

[ 編集 ] 関連項目 See also

[ 編集 ] 外部リンク External links


ビデオジャパンは、最大でランク。




© Lullar