title: What is the exact meaning of IFS=$'\n'?
body: <p>If the following example, which sets the <code>IFS</code> environment variable to a line feed character...</p>
  
  <pre><code>IFS=$'\n'
  </code></pre>
  
  <ul>
  <li>What does the <strong>dollar sign</strong> mean
  <strong>exactly</strong>?</li>
  <li>What does it do in this specific
  case?</li>
  <li>Where can I read more on this specific usage (Google doesn't allow special characters in searches and I don't know what to look for otherwise)?</li>
  </ul>
  
  <p>I know what the <code>IFS</code> environment variable is, and what the <code>\n</code> character is (line feed), but why not just use the following form: 
  <code>IFS="\n"</code> (which does not work)?</p>
  
  <p>For example, if I want to loop through every line of a file and want to use a for loop, I could do this:</p>
  
  <pre><code>for line in (&lt; /path/to/file); do
      echo "Line: $line"
  done
  </code></pre>
  
  <p>However, this won't work right unless <code>IFS</code> is set to a line feed character. To get it to work, I'd have to do this:</p>
  
  <pre><code>OLDIFS=$IFS
  IFS=$'\n'
  for line in (&lt; /path/to/file); do
      echo "Line: $line"
  done
  IFS=$OLDIFS
  </code></pre>
  
  <p><strong>Note:</strong> I don't need another way for doing the same thing, I know many other already... I'm only curious about that <code>$'\n'</code> and wondered if anyone could give me an explanation on it.</p>