Set lines of in a file to seperate vars

In a bash script, I'm looking for a way to set each matching line of a file into its own variable, or variable array.

As an example, i have a crontab file with several entries:

00 23 * * * /usr/local/bin/msqlupdate -all
00 11 * * * /usr/local/bin/msqlupdate -inc
00 03 * * * /usr/local/bin/msqlupdate -inc
00 18 * * * /usr/local/bin/msqlupdate -inc

So I'm trying to grab each line, put it into a variable that can be modified.
i.e. var[1] = line 1
var[2] = line 2 etc...

I think the '*' are throwing off everything I'm trying.

Thanks for any assistance.

Where do you want these variables to be recorded?

The following should work:

typeset -i iCnt=0
cat /path/to/file | while read line ; do
     typeset file_line[$iCnt]="$line"
     (( iCnt += 1 ))
done

# try if it is read correctly by printing it surrounded with quotes:
echo "The content of the read file is:"
iCnt=0
while [ $iCnt -lt ${#file_line[@]} ] ; do
     echo "\"${file_line[$iCnt]}\""
     (( iCnt += 1 ))
done

I hope this helps.

bakunin