title: Can I store file contents to a variable in a shell script?
body: <p>Say I have a file <em>file.txt</em> with data (say '100') in it. I want to read the contents of this file to a variable for future processing. I want this to work on both Linux and Solaris. How can I do this?</p>