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.
bashシェルスクリプトにシェルコマンドを追加して、スクリプトの実行時に、キーボードのEnterキーを押してから、スクリプト内の残りのコマンドを実行するのと同じアクションを実行できるようにします。
例:script.sh
#! /bin/bash <command equivalent to pressing enter key> echo "hi"
出力が
$sh script.sh $ hi $
Windowsの場合;
echo. echo hi echo.
Linuxの場合;
echo echo hi echo
「読み取り」コマンドを使用します。
#!/bin/bash read x echo "hi"