while read wholeline
do
echo ${wholeline} --outputs John Jones
#grab all the lines that begin with these values
#grep '^John Jones' workfile2 --works, prints contents of workfile2 where the 1st matches
grep '^${wholeline}' workfile2 # --does not work. why? it should be the same result.
done < workfile1
workfile1
contains the value John Jones
at the beginning of the line in the file.
workfile2
contains the value John Jones
at the beginning of the line in the file.
How can I change that second grep
statement so that it works?
It is picking up nothing.