Код: Выделить всё
convert_template()(
if ! [[ "$1" = *?.template ]]; then return; fi
local base=${1%.template} fout
if [ -e $base.config ]; then source $base.config ; fi
fout=${2:-$base} # or further filename eval
eval "cat
Подробнее здесь: [url]https://stackoverflow.com/questions/79773262/capture-error-within-bash-eval-cat-script[/url]
Мобильная версия