Code:
CONTENT=$(cat file.txt)
which is the more elegant way, or the older backquote method would be
Code:
CONTENT=`cat file.txt`
Both methods substitute the standard output of the command (whatever the command is) into the main command, whatever that is.