From c564211e3ec10f4eb1e47cd975ac4a08b743757e Mon Sep 17 00:00:00 2001 From: cheatsnake <72691412+cheatsnake@users.noreply.github.com> Date: Thu, 8 Sep 2022 21:23:36 +0300 Subject: [PATCH] added topic about debug --- files/linux/bash-scripts-cheatsheet.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/files/linux/bash-scripts-cheatsheet.md b/files/linux/bash-scripts-cheatsheet.md index 32580a4..ed9b7e8 100644 --- a/files/linux/bash-scripts-cheatsheet.md +++ b/files/linux/bash-scripts-cheatsheet.md @@ -802,4 +802,12 @@ $ bash script.sh ^CВыполнение программы прервано... ``` +## Отладка скриптов + +Запуск скрипта с параметром `-x` покажет его поэтапное выполнение, что будет полезно при отладке и поиске ошибок: + +``` +$ bash -x script.sh +``` +
Вернуться в начало ⬆️
\ No newline at end of file