Linux
  • Linux
  • Bash
  • Debian
  • Ubuntu
  • Shell
  • CentOS
  • SSH
☰

如何使用 crontab 和 mutt 執行命令並郵寄其輸出?

tag-icon 2024-6-10 • tag-icon cron email ifconfig
如何使用 crontab 和 mutt 執行命令並郵寄其輸出?

執行命令

echo "ifconfig" | bash | mutt -s "My IP" -- [email protected]

在貝殼廠。的輸出ifconfig包含在郵件中。

但是,添加行

@reboot echo "ifconfig" | bash | mutt -s "My IP" -- [email protected]

和crontab -e

僅在系統啟動時發送帶有主題的電子郵件。郵件內容為空。

THE END
如何用mplayer顯示影像? 如何用mplayer顯示影像?
python oneliner + 比較數字 python oneliner + 比較數字

相關內容

熱門問答

熱門問答

  • cron
  • email
  • ifconfig
  • mplayer
  • mencoder
  • linux
  • python
  • environment-variables

© 2024 rvso.com 版權所有. 網站地圖