How to pass text file contents as argument to console application? [duplicate]

./myapp `cat text_file`

Or

./myapp $(cat text_file)

Or use double quotes to pass all the text as a single argument

./myapp "$(cat text_file)"
./myapp "`cat text_file`"

Very simple, cat it.

cat file | some_script.sh

Have a look here for further help.