Perdonar la asuencia. Tengo meses un poco liados, y no me da tiempo a echar horas por aquí.
Aún así, esto te puede venir bien @USUARIONUEVO
Dado cualquier script, como puede ser este:
#!/bin/bash
test=2
array=( a b c d)
echo hola
echo $test
if [ $RANDOM -gt 1000 ]; then
echo wualaaaa
else
echo :O
fi
pwd
Puedes debugear todas las variables y el proceso de ejecución con el parámetro -x
$ bash -x ./a
+ test=2
+ array=(a b c d)
+ echo hola
hola
+ echo 2
2
+ '[' 24493 -gt 1000 ']'
+ echo wualaaaa
wualaaaa
+ pwd
/home/vk496/Documentos
Salu2