how to use echo command to print out content of a text file?
echo
doesn't read stdin so in this case, the redirect is just meaningless.
echo "Hello" | echo
To print out a file just use the command below
echo "$(<a.txt )"
In Unix, I believe all you have to do, assuming you have a file that isn't hefty is:
cat <filename>
No echo
required.