Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
違いは簡単です
. script.sh
現在のシェルを使用してシェルスクリプトを実行するため、スクリプトで行うすべての変更 (ディレクトリや変数の変更など) は、実行中のシェルに影響します
./script.sh
一方、新しいシェルを起動してスクリプトを実行します。通常、スクリプトを起動するためのより良い方法です