3

keep the bash-sript running if "exec command" fails

view full story
linux-howto

http://www.linuxquestions.org – Is there a way to use exec, but if exec fails to go on with the script? Example: Code: #!/usr/bin/env bash exec startx echo "Starting of X failed" If startx fails, the echo will be seen on the screen. I tried all kind of stuff, but guess it ain't of much use to post it here. I searched the web, but searching for "exec and bash" in one sentence does give results which are not what i am looking for. Thanks (HowTos)