Calling another shell script

Hi there,

I have an script reading content of a file and runs whatever command is specified there, as follows

#!/bin/bash
# Supposed to read from a file that commands are listed to be run
# when the server starts for initialization

CMD_FILE=/myScripts/startup/task2do.txt
if [ ! -e $CMD_FILE ]; then
        echo "No task file found as $CMD_FILE!" >&2
        exit 1
fi

grep -v ^# $CMD_FILE| while read line; do
       . $line
done

echo "All tasks been done!"
exit 0

I tried to source/call directly and it's working fine however, if the command that it is supposed to execute ends with &,it doesn't go through all the commands sequentially. Could you please tell me how should I write this code that even if the command it's going to execute is like a simple while-sleep deamon written.

Many thanks,

Why not just run the task2do.txt file?

# bash $CMD_FILE 

or:

# chmod 500 $CMD_FILE 
# $CMD_FILE 

?

Thanks Tony, sounds I am really simple. but I don't know why I was trying to make it hard! perhaps lack of experience! many thanks dude!