This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
средства_программирования_shell [2025/01/02 19:30] val [Ресурсы Web сервера на shell] |
средства_программирования_shell [2025/05/15 09:12] (current) val [Отправка email с вложениями] |
||
---|---|---|---|
Line 10: | Line 10: | ||
* [[https://www.tutorialspoint.com/execute_bash_online.php|Execute Bash Shell Online]] | * [[https://www.tutorialspoint.com/execute_bash_online.php|Execute Bash Shell Online]] | ||
* [[https://www.shellcheck.net/|ShellCheck finds bugs in your shell scripts.]] | * [[https://www.shellcheck.net/|ShellCheck finds bugs in your shell scripts.]] | ||
+ | |||
+ | * [[http://redsymbol.net/articles/unofficial-bash-strict-mode/|Use Bash Strict Mode (Unless You Love Debugging)]] | ||
===== Проверка синтаксиса ===== | ===== Проверка синтаксиса ===== | ||
Line 192: | Line 194: | ||
<code> | <code> | ||
- | $ cat log_gen.sh | + | bash -c 'cat <<END >log_gen.sh |
- | </code><code> | + | |
while : | while : | ||
do | do | ||
Line 199: | Line 200: | ||
logger -t cisco -p local0.info "Message 2" | logger -t cisco -p local0.info "Message 2" | ||
done | done | ||
+ | END' | ||
</code><code> | </code><code> | ||
- | $ sh cisco_log_gen.sh | + | $ sh log_gen.sh |
</code> | </code> | ||
===== Примеры использования скриптов sh в системах загрузки ===== | ===== Примеры использования скриптов sh в системах загрузки ===== | ||
Line 467: | Line 469: | ||
==== Отправка email с вложениями ==== | ==== Отправка email с вложениями ==== | ||
+ | * [[Утилита curl]] | ||
* [[https://serverfault.com/questions/38919/send-an-email-with-an-attached-file-using-telnet-or-netcat|Send an email with an attached file using telnet or netcat]] | * [[https://serverfault.com/questions/38919/send-an-email-with-an-attached-file-using-telnet-or-netcat|Send an email with an attached file using telnet or netcat]] | ||