<?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 Re: How to run Shell script as a source in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/how-to-run-shell-script-as-a-source/m-p/4078095#M94965</link>
    <description>&amp;gt;Steven: ". file" is the Bourne[-like]-shell syntax.&lt;BR /&gt;&amp;gt;/usr/bin/sh is a Bourne[-like] shell.&lt;BR /&gt;&lt;BR /&gt;More precisely, it IS the Posix shell.&lt;BR /&gt;(The Bourne shell are not the droids you seek.  You should only mention ksh and Posix shell. ;-)</description>
    <pubDate>Sat, 29 Sep 2007 02:09:06 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2007-09-29T02:09:06Z</dc:date>
    <item>
      <title>How to run Shell script as a source</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-run-shell-script-as-a-source/m-p/4078087#M94957</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;  I want to run a shell script through another shell script but as a source.&lt;BR /&gt;&lt;BR /&gt;     Ex - Test1.sh&lt;BR /&gt;             #!/usr/bin/sh&lt;BR /&gt;              source Test2.sh&lt;BR /&gt;&lt;BR /&gt;     where my Test2.sh will be&lt;BR /&gt;              #!/usr/bin/sh&lt;BR /&gt;                export HAI=hai&lt;BR /&gt;&lt;BR /&gt;       If give ./Test1.sh&lt;BR /&gt;&lt;BR /&gt;              I says&lt;BR /&gt;        Source not found .&lt;BR /&gt;&lt;BR /&gt;  can any one please suggest a solution for this&lt;BR /&gt;&lt;BR /&gt;thanks in advance &lt;BR /&gt;Vikram</description>
      <pubDate>Fri, 28 Sep 2007 07:48:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-run-shell-script-as-a-source/m-p/4078087#M94957</guid>
      <dc:creator>CA1490051</dc:creator>
      <dc:date>2007-09-28T07:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to run Shell script as a source</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-run-shell-script-as-a-source/m-p/4078088#M94958</link>
      <description>Hi Vikram:&lt;BR /&gt;&lt;BR /&gt;Sourcing (reading) is done thusly:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;. ./Test2.sh&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;That is, you specify a dot, a whitespace (space, tab) and the name of the file that you want to source (read).&lt;BR /&gt;&lt;BR /&gt;See my other example in your first post using a Perl script, too.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 28 Sep 2007 07:55:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-run-shell-script-as-a-source/m-p/4078088#M94958</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-09-28T07:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to run Shell script as a source</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-run-shell-script-as-a-source/m-p/4078089#M94959</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;Assuming the code is compatible.&lt;BR /&gt;&lt;BR /&gt;. ./scriptname&lt;BR /&gt;&lt;BR /&gt;dot space ./scriptname&lt;BR /&gt;&lt;BR /&gt;If you are in the same directory&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Fri, 28 Sep 2007 07:56:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-run-shell-script-as-a-source/m-p/4078089#M94959</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2007-09-28T07:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to run Shell script as a source</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-run-shell-script-as-a-source/m-p/4078090#M94960</link>
      <description>... and one very important aspect of a sourced script is that it must not do an exit or a return because the sourced file is part of the foreground process. If you exit the sourced file, you exit the process.</description>
      <pubDate>Fri, 28 Sep 2007 09:18:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-run-shell-script-as-a-source/m-p/4078090#M94960</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-09-28T09:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to run Shell script as a source</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-run-shell-script-as-a-source/m-p/4078091#M94961</link>
      <description>And as fas as I know you don't have to write  #!/usr/bin/sh in your sourced script...</description>
      <pubDate>Fri, 28 Sep 2007 09:51:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-run-shell-script-as-a-source/m-p/4078091#M94961</guid>
      <dc:creator>Oviwan</dc:creator>
      <dc:date>2007-09-28T09:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to run Shell script as a source</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-run-shell-script-as-a-source/m-p/4078092#M94962</link>
      <description>&amp;gt;And as fas as I know you don't have to &amp;gt;write #!/usr/bin/sh in your sourced &amp;gt;script...&lt;BR /&gt;&lt;BR /&gt;but it doesn't hurt and will change the output of file(1) from "ascii text" to "commands text".</description>
      <pubDate>Fri, 28 Sep 2007 10:22:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-run-shell-script-as-a-source/m-p/4078092#M94962</guid>
      <dc:creator>Bob E Campbell</dc:creator>
      <dc:date>2007-09-28T10:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to run Shell script as a source</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-run-shell-script-as-a-source/m-p/4078093#M94963</link>
      <description>"source file" is the C-shell syntax.&lt;BR /&gt;". file" is the Bourne[-like]-shell syntax.&lt;BR /&gt;&lt;BR /&gt;/usr/bin/sh is a Bourne[-like] shell.</description>
      <pubDate>Fri, 28 Sep 2007 10:47:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-run-shell-script-as-a-source/m-p/4078093#M94963</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-09-28T10:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to run Shell script as a source</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-run-shell-script-as-a-source/m-p/4078094#M94964</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Steven: "source file" is the C-shell syntax.&lt;BR /&gt;&lt;BR /&gt;It is also a built-in in the Bash shell ('bash').  There, either the dot syntax or the 'source' builtin can be used to import variables into the current environment.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 28 Sep 2007 11:32:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-run-shell-script-as-a-source/m-p/4078094#M94964</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-09-28T11:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to run Shell script as a source</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-run-shell-script-as-a-source/m-p/4078095#M94965</link>
      <description>&amp;gt;Steven: ". file" is the Bourne[-like]-shell syntax.&lt;BR /&gt;&amp;gt;/usr/bin/sh is a Bourne[-like] shell.&lt;BR /&gt;&lt;BR /&gt;More precisely, it IS the Posix shell.&lt;BR /&gt;(The Bourne shell are not the droids you seek.  You should only mention ksh and Posix shell. ;-)</description>
      <pubDate>Sat, 29 Sep 2007 02:09:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-run-shell-script-as-a-source/m-p/4078095#M94965</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-09-29T02:09:06Z</dc:date>
    </item>
  </channel>
</rss>

