<?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: Shell scripting in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3485910#M214047</link>
    <description>Hi Ami,&lt;BR /&gt;&lt;BR /&gt;try the following in your script.&lt;BR /&gt;&lt;BR /&gt;#nohup &lt;COMMAND to="" be="" executed=""&gt;&lt;BR /&gt;&lt;BR /&gt;This allows the command to be keep ruuning even after after changing the session.&lt;BR /&gt;&lt;BR /&gt;If you can post your script then people can modify that in a better way. post it if you dont mind.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Syam&lt;/COMMAND&gt;</description>
    <pubDate>Tue, 15 Feb 2005 06:21:16 GMT</pubDate>
    <dc:creator>Ranjith_5</dc:creator>
    <dc:date>2005-02-15T06:21:16Z</dc:date>
    <item>
      <title>Shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3485909#M214046</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;I'm programming a shell Script To start and stop an application. &lt;BR /&gt;my problem is that to execute some applications I have to change the user and load his Environment parameters. &lt;BR /&gt;using su - &lt;USER&gt; -c &lt;COMMAND&gt; didn't succeed because there are many parmeters to load for this user.&lt;BR /&gt;where doing su - in the script &lt;BR /&gt;unix changes the user and stop running the scrip. &lt;BR /&gt;So I need your help because I'm learning shell scripting. &lt;BR /&gt;I'm working with hp-ux 11.11 &lt;BR /&gt;&lt;BR /&gt;Thanks for your help !!&lt;BR /&gt;&lt;BR /&gt;&lt;/COMMAND&gt;&lt;/USER&gt;</description>
      <pubDate>Tue, 15 Feb 2005 06:06:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3485909#M214046</guid>
      <dc:creator>GNOM</dc:creator>
      <dc:date>2005-02-15T06:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3485910#M214047</link>
      <description>Hi Ami,&lt;BR /&gt;&lt;BR /&gt;try the following in your script.&lt;BR /&gt;&lt;BR /&gt;#nohup &lt;COMMAND to="" be="" executed=""&gt;&lt;BR /&gt;&lt;BR /&gt;This allows the command to be keep ruuning even after after changing the session.&lt;BR /&gt;&lt;BR /&gt;If you can post your script then people can modify that in a better way. post it if you dont mind.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Syam&lt;/COMMAND&gt;</description>
      <pubDate>Tue, 15 Feb 2005 06:21:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3485910#M214047</guid>
      <dc:creator>Ranjith_5</dc:creator>
      <dc:date>2005-02-15T06:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3485911#M214048</link>
      <description>Assuming that you can su to the specified user without a password prompt, then why not invoke another script as the command - one that ensures environment is set up correctly, and that then invokes the 'proper' command you want to run.</description>
      <pubDate>Tue, 15 Feb 2005 10:03:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3485911#M214048</guid>
      <dc:creator>B Woolley</dc:creator>
      <dc:date>2005-02-15T10:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3485912#M214049</link>
      <description>please try using the following instead of su - , &lt;BR /&gt;su user -c 'command'&lt;BR /&gt;I think this will solve the issue as the parameters will possibly get wiped by a full login, unless there's really really many.</description>
      <pubDate>Tue, 15 Feb 2005 13:05:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3485912#M214049</guid>
      <dc:creator>Florian Heigl (new acc)</dc:creator>
      <dc:date>2005-02-15T13:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3485913#M214050</link>
      <description>Hi,&lt;BR /&gt;Have you tried loading the environment variables into the script of the user who you are trying to do a su - on?&lt;BR /&gt;I would also try as suggested above, trying to do a manual su - &lt;USER&gt; -c &lt;COMMAND&gt;.&lt;/COMMAND&gt;&lt;/USER&gt;</description>
      <pubDate>Tue, 15 Feb 2005 16:01:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3485913#M214050</guid>
      <dc:creator>Sheriff Andy</dc:creator>
      <dc:date>2005-02-15T16:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: Shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3485914#M214051</link>
      <description>You could try the following-&lt;BR /&gt; &lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;echo Running this as "root"&lt;BR /&gt;su otheruser &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;echo I am now `id`&lt;BR /&gt;. ~otheruser/.profile&lt;BR /&gt;echo I now have my env variables like otheruser&lt;BR /&gt;...&lt;BR /&gt;EOF&lt;BR /&gt; &lt;BR /&gt;This way even though a new shell is started for the new "su" user, it will continue to read in the script from the file. Using "." will source in the .profile.&lt;BR /&gt; &lt;BR /&gt;You can now run applications (for the most part) like you were "otheruser"&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills&lt;BR /&gt;</description>
      <pubDate>Tue, 15 Feb 2005 18:11:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3485914#M214051</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2005-02-15T18:11:30Z</dc:date>
    </item>
  </channel>
</rss>

