title: removing linebreak from a line read from a file in bash
body: <p>I have a file containing some lines. I wanted to store each line to a variable , but the line must be chomped (the way its done in perl - chomp($Line) ) in shell script. </p>
  
  <p>The code containing the functionality of opening a file and reading the lines is </p>
  
  <pre><code>p_file() {
  
  File=$1
  count=0
  
  while read LINE
  do
        chomped_line=$LINE    **#How to delete the linebreaks** 
        echo $chomped_line
  
  done &lt; $File
  
  }
  </code></pre>
  
  <p>How to delete the linebreaks and store the string in the variable(chomped_line) as above </p>