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.
atシェル スクリプトで (特定の時間にジョブを実行するように設定するための) Unix コマンドを使用しようとしています。時間は、正常に動作しているように見える getopts と optarg を使用したユーザー入力によって指定されます。問題はat. atユーザーからの入力に基づいて特定の時間に実行するコマンドをスクリプトに書き込むにはどうすればよいですか?
at
ありがとう、ライアン
私は言うだろう
at now +10 minutes <<< "rm -rf /tmp/tobedeleted"
複数行の場合は、「HERE-doc」を検討してください
at now +10 minutes <<ENDMARKER rm -rf /tmp/tobedeleted echo all done | mail -s 'completion notification' sysadmin@example.com ENDMARKER