<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <br>
    <div class="moz-cite-prefix">On 4/12/17 1:15 PM, Greg Silverman (CS)
      wrote:<br>
    </div>
    <blockquote
cite="mid:675329def2504742aec893b0bc5e5b96@vrtsxchclupin05.community.veritas.com"
      type="cite">
      <p class="MsoNormal">Many of the generated fixes uses this idiom<o:p></o:p></p>
      <p class="MsoNormal">IFS=$’\n’ …<o:p></o:p></p>
      <p class="MsoNormal">unset $IFS<o:p></o:p><o:p> </o:p>
      </p>
      <p class="MsoNormal">IFS is a variable, but, $IFS is a character
        string, so, unsetting it does not restore IFS to its default
        value. What am I missing?</p>
    </blockquote>
    <br>
    Those lines are from the audit remediation templates, e.g.:<br>
<a class="moz-txt-link-freetext" href="https://github.com/OpenSCAP/scap-security-guide/blob/master/shared/xccdf/remediation_functions.xml#L97#L99">https://github.com/OpenSCAP/scap-security-guide/blob/master/shared/xccdf/remediation_functions.xml#L97#L99</a><br>
    <br>
    <blockquote type="cite">
      <meta charset="utf-8">
    </blockquote>
    <blockquote type="cite">IFS=$'\n' matches=($(sed -s -n -e
      "/${pattern}/!d" -e "/${arch}/!d" -e "/${group}/!d;F"
      /etc/audit/rules.d/*.rules))<br>
      # Reset IFS back to default<br>
      unset $IFS</blockquote>
    <br>
    Because the variable is used multiple times (e.g. each audit
    remediation), it is a good practice to completely remove the
    variable/data from the system between function calls.<br>
    <br>
    For example:<br>
    <br>
    $ stringVar="This is my string"<br>
    $ echo $stringVar<br>
    This is my string<br>
    <br>
    $ unset stringVar<br>
    <br>
    $ echo $stringVar<br>
    -bash: stringVar: unbound variable<br>
    <br>
  </body>
</html>