Wednesday, August 1, 2012

How do you debug specific block of code in shell scripting?

You can mention the block of code within "set -x" and "set +x" command. For example :

#!/usr/bin/sh

echo "Welcome"
set -x
echo "Rabindra!"
echo "Nayak"
set +x
echo " to the world!"

No comments :