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.
特定のタスクを実行するためにパスワードの入力を求めるスクリプトがあります。毎回パスワードの入力をスキップしたいです。このために、私はそのようなsthについて考えました:
./myscript < my_file_containing_pass
しかし残念ながら、これは機能しません。
何か案が?
パスワードファイルの最後に改行があることを確認してください。
それでもうまくいかない場合は、環境変数を設定し、スクリプトを変更して、この env. 変数の値を使用してファイルからパスワードを読み取ります。それ以外の場合は、ユーザーにプロンプトを表示します。