<?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 shell script tha tdoes not work in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/shell-script-tha-tdoes-not-work/m-p/3799871#M23655</link>
    <description>Red Hat Enterprise linux 4.0&lt;BR /&gt;&lt;BR /&gt;This is MyScript.sh&lt;BR /&gt;&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;groupadd oinstall&lt;BR /&gt;&lt;BR /&gt;But it returns an erro when I run it as root.&lt;BR /&gt;&lt;BR /&gt;[root@lab2 ~]# ./MyScript.sh&lt;BR /&gt;: bad interpreter: No such file or directory&lt;BR /&gt;&lt;BR /&gt;I do have the file /bin/bash&lt;BR /&gt;&lt;BR /&gt;[root@lab2 ~]# ll /bin/bash&lt;BR /&gt;-rwxr-xr-x  1 root root 616312 Dec  6  2004 /bin/bash&lt;BR /&gt;&lt;BR /&gt;Any idea?</description>
    <pubDate>Sun, 04 Jun 2006 20:24:43 GMT</pubDate>
    <dc:creator>Tonatiuh</dc:creator>
    <dc:date>2006-06-04T20:24:43Z</dc:date>
    <item>
      <title>shell script tha tdoes not work</title>
      <link>https://community.hpe.com/t5/operating-system-linux/shell-script-tha-tdoes-not-work/m-p/3799871#M23655</link>
      <description>Red Hat Enterprise linux 4.0&lt;BR /&gt;&lt;BR /&gt;This is MyScript.sh&lt;BR /&gt;&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;groupadd oinstall&lt;BR /&gt;&lt;BR /&gt;But it returns an erro when I run it as root.&lt;BR /&gt;&lt;BR /&gt;[root@lab2 ~]# ./MyScript.sh&lt;BR /&gt;: bad interpreter: No such file or directory&lt;BR /&gt;&lt;BR /&gt;I do have the file /bin/bash&lt;BR /&gt;&lt;BR /&gt;[root@lab2 ~]# ll /bin/bash&lt;BR /&gt;-rwxr-xr-x  1 root root 616312 Dec  6  2004 /bin/bash&lt;BR /&gt;&lt;BR /&gt;Any idea?</description>
      <pubDate>Sun, 04 Jun 2006 20:24:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/shell-script-tha-tdoes-not-work/m-p/3799871#M23655</guid>
      <dc:creator>Tonatiuh</dc:creator>
      <dc:date>2006-06-04T20:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: shell script tha tdoes not work</title>
      <link>https://community.hpe.com/t5/operating-system-linux/shell-script-tha-tdoes-not-work/m-p/3799872#M23656</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Almost positively =your problem is related&lt;BR /&gt;to bad End-Of-Line (EOL).&lt;BR /&gt;&lt;BR /&gt;My guess, is it possible that you copied&lt;BR /&gt;this script via FTP in ASCII mode, or &lt;BR /&gt;got it from a Windows system? Type this:&lt;BR /&gt;&lt;BR /&gt; sed 1q MyScript.sh | od -c&lt;BR /&gt;&lt;BR /&gt;If there's a trailing Carriage Return &lt;BR /&gt;(^M, \015, or \r\n) character after the &lt;BR /&gt;/bin/bash on that line, then you have a DOS-formatted script.&lt;BR /&gt;&lt;BR /&gt;It would produce this behaviour because &lt;BR /&gt;you are trying to run "/bin/bash^M", &lt;BR /&gt;not "/bin/bash".&lt;BR /&gt;&lt;BR /&gt;Simple fix:&lt;BR /&gt;&lt;BR /&gt;dos2unix MyScript.sh&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;VK2COT</description>
      <pubDate>Sun, 04 Jun 2006 22:48:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/shell-script-tha-tdoes-not-work/m-p/3799872#M23656</guid>
      <dc:creator>VK2COT</dc:creator>
      <dc:date>2006-06-04T22:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: shell script tha tdoes not work</title>
      <link>https://community.hpe.com/t5/operating-system-linux/shell-script-tha-tdoes-not-work/m-p/3799873#M23657</link>
      <description>You where right. Problem solved.&lt;BR /&gt;&lt;BR /&gt;THANK YOU!</description>
      <pubDate>Sun, 04 Jun 2006 23:17:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/shell-script-tha-tdoes-not-work/m-p/3799873#M23657</guid>
      <dc:creator>Tonatiuh</dc:creator>
      <dc:date>2006-06-04T23:17:12Z</dc:date>
    </item>
  </channel>
</rss>

