title: Unix ksh loop and put the result into variable
body: <p>I have a simple thing to do, but I'm novice in UNIX.
  So, I have a file and on each line I have an ID.
  I need to go through the file and put all ID's into one variable.</p>
  
  <p>I've tried something like in Java but does not work.</p>
  
  <pre><code>for variable in `cat myFile.txt`
  do
      param=`echo "${param} ${variable}"`
  done 
  </code></pre>
  
  <p>It does not seems to add all values into param.</p>
  
  <p>Thanks.</p>