スクリプト

script コマンドを使用すると、指定されたスクリプトファイルから一連のコマンドを実行できます。これは、反復的なタスクの自動化や環境の迅速な設定に役立ちます。

このコマンドは、実行するコマンドを含むスクリプトファイルへのファイルパスを引数として指定します。例:

$>script -- /path/to/your/script.txt

スクリプトコマンドはオプションを定義していないため、曖昧さを避けるため、スクリプトファイルのパスを指定する前に -- 区切り文字を使用する必要があります。コマンド構文の詳細については、コマンド構文セクションを参照してください。

The script file should contain one command per line, and the commands will be executed in the order they appear in the file. Comments can be added to the script file by starting a line with a # character.