<?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 script for multiple users or multiple su commands. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-multiple-users-or-multiple-su-commands/m-p/4088954#M310046</link>
    <description>Something like this:&lt;BR /&gt;&lt;BR /&gt;for USER in user1 user2 user3 user4 do&lt;BR /&gt;su - $USER -c myscript&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Where myscript contains the commands you wish to have run.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
    <pubDate>Fri, 19 Oct 2007 11:27:55 GMT</pubDate>
    <dc:creator>Pete Randall</dc:creator>
    <dc:date>2007-10-19T11:27:55Z</dc:date>
    <item>
      <title>Shell script for multiple users or multiple su commands.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-multiple-users-or-multiple-su-commands/m-p/4088953#M310045</link>
      <description>I would like to make one shell script which will be run by root and su to four different users to execute the following commands in sequence on the same server.&lt;BR /&gt;&lt;BR /&gt;For user1 user2 user3 user 4 run following commands after setting up environment variables:&lt;BR /&gt;&lt;BR /&gt;psadmin -p kill     -d       $PS_DOMAIN&lt;BR /&gt;psadmin -c shutdown -d $PS_DOMAIN&lt;BR /&gt;stopWebLogic.sh PIA&lt;BR /&gt;stopWebLogic.sh&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Gulam.&lt;BR /&gt;</description>
      <pubDate>Fri, 19 Oct 2007 11:20:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-multiple-users-or-multiple-su-commands/m-p/4088953#M310045</guid>
      <dc:creator>Gulam Mohiuddin</dc:creator>
      <dc:date>2007-10-19T11:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script for multiple users or multiple su commands.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-multiple-users-or-multiple-su-commands/m-p/4088954#M310046</link>
      <description>Something like this:&lt;BR /&gt;&lt;BR /&gt;for USER in user1 user2 user3 user4 do&lt;BR /&gt;su - $USER -c myscript&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Where myscript contains the commands you wish to have run.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 19 Oct 2007 11:27:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-multiple-users-or-multiple-su-commands/m-p/4088954#M310046</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2007-10-19T11:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script for multiple users or multiple su commands.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-multiple-users-or-multiple-su-commands/m-p/4088955#M310047</link>
      <description>Sorry, make that:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;for USER in user1 user2 user3 user4 &lt;BR /&gt;do&lt;BR /&gt;su - $USER -c myscript&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 19 Oct 2007 11:29:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-multiple-users-or-multiple-su-commands/m-p/4088955#M310047</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2007-10-19T11:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script for multiple users or multiple su commands.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-multiple-users-or-multiple-su-commands/m-p/4088956#M310048</link>
      <description>Logically the same thing, but maybe easier to follow.&lt;BR /&gt;&lt;BR /&gt;for USER in user1 user2 user3 user4 ; do&lt;BR /&gt;  su - $USER -c 'psadmin -p kill -d $PS_DOMAIN ; psadmin -c shutdown -d $PS_DOMAIN ; stopWebLogic.sh PIA ; StopWebLogic.sh'&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 19 Oct 2007 11:56:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-multiple-users-or-multiple-su-commands/m-p/4088956#M310048</guid>
      <dc:creator>Shannon Petry</dc:creator>
      <dc:date>2007-10-19T11:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script for multiple users or multiple su commands.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-multiple-users-or-multiple-su-commands/m-p/4088957#M310049</link>
      <description>Yet another way of doing the same thing:&lt;BR /&gt;&lt;BR /&gt;# echo "user1\nuser2\nuser3\nuser4" | xargs -n1 -i su - {} -c Script.sh&lt;BR /&gt;&lt;BR /&gt;...where Script.sh contains&lt;BR /&gt;&lt;BR /&gt;psadmin -p kill -d $PS_DOMAIN&lt;BR /&gt;psadmin -c shutdown -d $PS_DOMAIN&lt;BR /&gt;stopWebLogic.sh PIA&lt;BR /&gt;stopWebLogic.sh&lt;BR /&gt;</description>
      <pubDate>Fri, 19 Oct 2007 12:10:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-multiple-users-or-multiple-su-commands/m-p/4088957#M310049</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-10-19T12:10:49Z</dc:date>
    </item>
  </channel>
</rss>

