<?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: Script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2451081#M11014</link>
    <description>Carlo:&lt;BR /&gt;&lt;BR /&gt;that is because you program gets run as a child process to your shell, so when the program exits, the parent process (your shell) does not remember anything.&lt;BR /&gt;you may have to use "exec" to spawn your process. or:&lt;BR /&gt;&lt;BR /&gt;# . your_script&lt;BR /&gt;&lt;BR /&gt;the . (dot) reads your script into your current shell and so it will work.</description>
    <pubDate>Fri, 06 Oct 2000 12:32:34 GMT</pubDate>
    <dc:creator>Kofi ARTHIABAH</dc:creator>
    <dc:date>2000-10-06T12:32:34Z</dc:date>
    <item>
      <title>Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2451078#M11011</link>
      <description>I am trying to do a cd in my session with a script.&lt;BR /&gt;&lt;BR /&gt;i.e. in an script have:&lt;BR /&gt;&lt;BR /&gt;cd /oracle/app/product&lt;BR /&gt;&lt;BR /&gt;but after it is run, I am back to the original directory.&lt;BR /&gt;&lt;BR /&gt;What am I doing wrong?</description>
      <pubDate>Fri, 06 Oct 2000 12:25:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2451078#M11011</guid>
      <dc:creator>Carlo Henrico_1</dc:creator>
      <dc:date>2000-10-06T12:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2451079#M11012</link>
      <description>The cd only affects the script that you called - it's a separate process.&lt;BR /&gt;&lt;BR /&gt;If you want to influence your current script then you'll have to 'dot' the subscript:-&lt;BR /&gt;&lt;BR /&gt;. &lt;SUBSCRIPT&gt;&lt;/SUBSCRIPT&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;John</description>
      <pubDate>Fri, 06 Oct 2000 12:29:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2451079#M11012</guid>
      <dc:creator>John Palmer</dc:creator>
      <dc:date>2000-10-06T12:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2451080#M11013</link>
      <description>Sorry, I'm still lost.&lt;BR /&gt;&lt;BR /&gt;'dot' the script?</description>
      <pubDate>Fri, 06 Oct 2000 12:31:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2451080#M11013</guid>
      <dc:creator>Carlo Henrico_1</dc:creator>
      <dc:date>2000-10-06T12:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2451081#M11014</link>
      <description>Carlo:&lt;BR /&gt;&lt;BR /&gt;that is because you program gets run as a child process to your shell, so when the program exits, the parent process (your shell) does not remember anything.&lt;BR /&gt;you may have to use "exec" to spawn your process. or:&lt;BR /&gt;&lt;BR /&gt;# . your_script&lt;BR /&gt;&lt;BR /&gt;the . (dot) reads your script into your current shell and so it will work.</description>
      <pubDate>Fri, 06 Oct 2000 12:32:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2451081#M11014</guid>
      <dc:creator>Kofi ARTHIABAH</dc:creator>
      <dc:date>2000-10-06T12:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2451082#M11015</link>
      <description>yes Carlo, from the command prompt, type . (dot) followed by the full path to your scriptname</description>
      <pubDate>Fri, 06 Oct 2000 12:34:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2451082#M11015</guid>
      <dc:creator>Kofi ARTHIABAH</dc:creator>
      <dc:date>2000-10-06T12:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2451083#M11016</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;for your purposes you can use the alias function (posix/korn shell).&lt;BR /&gt;Ie: alias orap="cd /oracle/app/product"&lt;BR /&gt;Then if you type orap you will change to the specified directory.&lt;BR /&gt;To make it permanent insert the alias line into your $HOME/.profile&lt;BR /&gt;&lt;BR /&gt;Regards &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Oct 2000 12:34:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2451083#M11016</guid>
      <dc:creator>Andreas Voss</dc:creator>
      <dc:date>2000-10-06T12:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2451084#M11017</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;Do like this:&lt;BR /&gt;&lt;BR /&gt;example: -&amp;gt; the script is /tmp/test_cd&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;&lt;BR /&gt;cd /tmp&lt;BR /&gt;&lt;BR /&gt;# . /tmp/test_cd&lt;BR /&gt;&lt;BR /&gt;I hope this helps</description>
      <pubDate>Fri, 06 Oct 2000 12:35:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2451084#M11017</guid>
      <dc:creator>federico_3</dc:creator>
      <dc:date>2000-10-06T12:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2451085#M11018</link>
      <description>If you have a script called for instance 'sss', when you type sss the script runs as a child process of your current shell. Any changes to the environment that are made in sss (such as cd) only affect that process.&lt;BR /&gt;&lt;BR /&gt;You can however run a script within your current shell by typing:-&lt;BR /&gt;. sss&lt;BR /&gt;This causes your shell to read sss and obey the commands itself. You see it used a lot to condition shell environments for a particular purpose. For example '. oraenv' is used to setup the environment variables etc in an Oracle environment.&lt;BR /&gt;I'ts commonly called 'dotting' a script.&lt;BR /&gt;&lt;BR /&gt;For more details (and a better explanation) do 'man sh-posix' and search for Special Commands.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;John</description>
      <pubDate>Fri, 06 Oct 2000 12:43:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2451085#M11018</guid>
      <dc:creator>John Palmer</dc:creator>
      <dc:date>2000-10-06T12:43:02Z</dc:date>
    </item>
  </channel>
</rss>

