First you want to read in the data from the file. This can be accomplished in several ways, the easiest is
Code:
FILE=`cat filename`
Then, you want to echo this file data out, and look at each line. For each line, simply execute the line as though it were a command:
Code:
echo "$FILE" | \ # notice we PIPE the output data to the next line (denoted by \)
while read CMD; do # CMD is the line, this could be any variable name
$CMD # just execute it
done