Debugging bash scripts.
Ralf Mardorf
silver.bullet at zoho.com
Sat Feb 16 18:07:50 UTC 2019
On Sat, 16 Feb 2019 17:33:16 +0100, Ralf Mardorf wrote:
>If your bash scripts really need debugging that much
My apologies for the amount of replies. A last one.
It's not meant as a disdainful comment. IMO using a debugger to debug
shell scripts is uncomfortable, since quite useless, since a bash script
is "just" a set of rules to run programs. Apart from syntax errors and
typos and errors in reasoning there is nothing that could go wrong. IOW
there is not much to debug and/or strace, STDERR/STDOUT is all we
need to check a shell script. Sometimes it might be required to strace
(or even to debug) a program used by the script, but not the script
itself.
YMMV!
You could try to build it yourself,
https://sourceforge.net/projects/bashdb/files/, an Arch Linux package
seems to be doable by just running
./configure --prefix=/usr --disable-static -C
make
and apart from a basic Arch install it requires
'bash', 'python-pygments' and 'pygmentize' packages (for Ubuntu probably
dev packages ;).
On Ubuntu I would finish by running
sudo checkinstall
instead of "sudo make install",
https://packages.ubuntu.com/cosmic/checkinstall.
More information about the ubuntu-users
mailing list