after the kill statement the script prints "Terminated" and the following lines never get executed:
#!/bin/bash
kill -9 `ps -ef | grep MailSender | grep -v grep | awk '{print $2}'`
echo starting
./MailSender
I have even tried to add set +e
at the beginning but it still exits after kill.