<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Package script bug: link_install.sh and tr -s [:blank:] in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Package-script-bug-link-install-sh-and-tr-s-blank/m-p/1145203#M26658</link>
    <description>&lt;P&gt;Having installed the package intel-comp-l-all-vars-19.0.1-144 via apt on Ubuntu, I've run into a problem with the script at&amp;nbsp;/opt/intel/compilers_and_libraries_2019.1.144/linux/bin/link_install.sh which is run as part of the installation process.&amp;nbsp; On my system this script&amp;nbsp;fails and prevents apt from completing.&lt;/P&gt;&lt;P&gt;This is because it contains a few instances of lines like:&lt;/P&gt;
&lt;PRE class="brush:bash; class-name:dark;"&gt;str=$(echo $str | tr -s [:blank:] | sed 's/^ *//g')&lt;/PRE&gt;

&lt;P&gt;The problem here is the&lt;/P&gt;

&lt;PRE class="brush:bash; class-name:dark;"&gt;[:blank:]&lt;/PRE&gt;

&lt;P&gt;On most systems it will do the right thing -- but square brackets actually denote a bash glob.&amp;nbsp; So if it happens to match files called e.g. "b", "l" or&amp;nbsp;"a" (in your root directory, from where apt runs the script), bash will substitute those in place of [:blank:] and tr will get the wrong arguments.&lt;/P&gt;
&lt;P&gt;I happen to have both a /a and a /n on my systems, so what gets run is "tr -s a n" which substitutes all "a"s for "n"s... definitely not what the author intended!&amp;nbsp; The symptom is lines such as&lt;/P&gt;
&lt;P&gt;/opt/intel/compilers_and_libraries_2019.1.144/linux/bin/link_install.sh: line 565: =/opt/intel/compilers_nd_librnries: No such file or directory&lt;/P&gt;
&lt;P&gt;output by apt (or dpkg) before the installation aborts.&lt;/P&gt;
&lt;P&gt;Simple fix: put every instance of [:blank:] in quotes:&amp;nbsp;"[:blank:]".&lt;/P&gt;</description>
    <pubDate>Sat, 02 Feb 2019 01:18:42 GMT</pubDate>
    <dc:creator>Scott__Malcolm</dc:creator>
    <dc:date>2019-02-02T01:18:42Z</dc:date>
    <item>
      <title>Package script bug: link_install.sh and tr -s [:blank:]</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Package-script-bug-link-install-sh-and-tr-s-blank/m-p/1145203#M26658</link>
      <description>&lt;P&gt;Having installed the package intel-comp-l-all-vars-19.0.1-144 via apt on Ubuntu, I've run into a problem with the script at&amp;nbsp;/opt/intel/compilers_and_libraries_2019.1.144/linux/bin/link_install.sh which is run as part of the installation process.&amp;nbsp; On my system this script&amp;nbsp;fails and prevents apt from completing.&lt;/P&gt;&lt;P&gt;This is because it contains a few instances of lines like:&lt;/P&gt;
&lt;PRE class="brush:bash; class-name:dark;"&gt;str=$(echo $str | tr -s [:blank:] | sed 's/^ *//g')&lt;/PRE&gt;

&lt;P&gt;The problem here is the&lt;/P&gt;

&lt;PRE class="brush:bash; class-name:dark;"&gt;[:blank:]&lt;/PRE&gt;

&lt;P&gt;On most systems it will do the right thing -- but square brackets actually denote a bash glob.&amp;nbsp; So if it happens to match files called e.g. "b", "l" or&amp;nbsp;"a" (in your root directory, from where apt runs the script), bash will substitute those in place of [:blank:] and tr will get the wrong arguments.&lt;/P&gt;
&lt;P&gt;I happen to have both a /a and a /n on my systems, so what gets run is "tr -s a n" which substitutes all "a"s for "n"s... definitely not what the author intended!&amp;nbsp; The symptom is lines such as&lt;/P&gt;
&lt;P&gt;/opt/intel/compilers_and_libraries_2019.1.144/linux/bin/link_install.sh: line 565: =/opt/intel/compilers_nd_librnries: No such file or directory&lt;/P&gt;
&lt;P&gt;output by apt (or dpkg) before the installation aborts.&lt;/P&gt;
&lt;P&gt;Simple fix: put every instance of [:blank:] in quotes:&amp;nbsp;"[:blank:]".&lt;/P&gt;</description>
      <pubDate>Sat, 02 Feb 2019 01:18:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Package-script-bug-link-install-sh-and-tr-s-blank/m-p/1145203#M26658</guid>
      <dc:creator>Scott__Malcolm</dc:creator>
      <dc:date>2019-02-02T01:18:42Z</dc:date>
    </item>
    <item>
      <title>interesting, Thanks Scott. we</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Package-script-bug-link-install-sh-and-tr-s-blank/m-p/1145204#M26659</link>
      <description>&lt;P&gt;interesting, Thanks Scott. we will inform our install team about this fix.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 01:47:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Package-script-bug-link-install-sh-and-tr-s-blank/m-p/1145204#M26659</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2019-02-05T01:47:58Z</dc:date>
    </item>
  </channel>
</rss>

