Inactive Tutor answered 06/24/20
Tutor
New to Wyzant
If you are using sh as your shell, the best way to load an entire file into one variable is this simple assignment:
$ whole_file=`cat myfile.txt`
In bash shell, you also can use the following substitution construct:
$ whole_file=$(< myfile.txt)