Hi, In the following bash code snippet; my main aim is to throw a string 'Unhandled exception occurred' using trap command. The command should capture 'exit 30' command. But; it is unable to do so. trap 'echo " Unhandled condition occurred "' SIGUSR1 testdir() { dir="$@" if [ ! -d $dir ] then case "$dir" in "/tmp/logdir" ) mkdir $dir ;; "$HOME/s3sync" ) echo "s3sync is not installed." ;; * ) echo "In function ${FUNCNAME} at $LINENO " exit 30;; esac fi }
With Warm Regards, Ameya Sathe Blog: http://www.linuxquestions.org/blog/mr.-ameya-sathe-352399/ _______________________________________ Pune GNU/Linux Users Group Mailing List