title: Bash: Special characters lost when reading file
body: <p>I have a file containing some Latex : </p>
  
  <pre><code>\begin{figure}[ht]
   \centering
   \includegraphics[scale=0.15]{logo.pdf}
   \caption{Example of a pdf file inclusion}
   \label{fig:pdfexample}
  \end{figure}
  </code></pre>
  
  <p>I want to read it in a bash script : </p>
  
  <pre><code>while read line
    do
      echo $line
    done &lt; "my.tex"
  </code></pre>
  
  <p>The output is </p>
  
  <pre><code>begin{figure}[ht]
  centering
  includegraphics[scale=0.15]{logo.pdf}
  caption{Example of a pdf file inclusion}
  label{fig:pdfexample}
  </code></pre>
  
  <p>Why did I lose the backslashes and initial spaces ? </p>
  
  <p>How to preserve them ? </p>