<?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 Ch. 11 Shell Script Needed in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ch-11-shell-script-needed/m-p/3287495#M882707</link>
    <description>I'm studying the "HP Certified: HPUX System Administration" book and the answer to the review question #6 in Ch. 11 is missing.  It sounds simple but I'm new and need some help.  The question reads as follows:&lt;BR /&gt;&lt;BR /&gt;Previously all users were using the Bourne shell. The administration has changed the policy and now everyone is asked to use the POSIX shell. Write a program that changes the shell of all users from /usr/bin/old/sh to /usr/bin/sh.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 26 May 2004 09:33:29 GMT</pubDate>
    <dc:creator>Andre Harvey</dc:creator>
    <dc:date>2004-05-26T09:33:29Z</dc:date>
    <item>
      <title>Ch. 11 Shell Script Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ch-11-shell-script-needed/m-p/3287495#M882707</link>
      <description>I'm studying the "HP Certified: HPUX System Administration" book and the answer to the review question #6 in Ch. 11 is missing.  It sounds simple but I'm new and need some help.  The question reads as follows:&lt;BR /&gt;&lt;BR /&gt;Previously all users were using the Bourne shell. The administration has changed the policy and now everyone is asked to use the POSIX shell. Write a program that changes the shell of all users from /usr/bin/old/sh to /usr/bin/sh.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 26 May 2004 09:33:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ch-11-shell-script-needed/m-p/3287495#M882707</guid>
      <dc:creator>Andre Harvey</dc:creator>
      <dc:date>2004-05-26T09:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Ch. 11 Shell Script Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ch-11-shell-script-needed/m-p/3287496#M882708</link>
      <description>sed "s/\/usr\/bin\/old\/sh/\/usr\/bin\/sh/" /etc/passwd &amp;gt; /etc/passwd.new &amp;amp;&amp;amp; mv /etc/passwd.new /etc/passwd&lt;BR /&gt; &lt;BR /&gt;Looks like it will work!</description>
      <pubDate>Wed, 26 May 2004 09:42:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ch-11-shell-script-needed/m-p/3287496#M882708</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-05-26T09:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Ch. 11 Shell Script Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ch-11-shell-script-needed/m-p/3287497#M882709</link>
      <description>Thanks!</description>
      <pubDate>Wed, 26 May 2004 09:55:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ch-11-shell-script-needed/m-p/3287497#M882709</guid>
      <dc:creator>Andre Harvey</dc:creator>
      <dc:date>2004-05-26T09:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Ch. 11 Shell Script Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ch-11-shell-script-needed/m-p/3287498#M882710</link>
      <description>Dear Scott,&lt;BR /&gt;&lt;BR /&gt;If I understand you, you need a routing that replace in the passwd file the string â  /usr/bin/old/shâ   to â  /usr/bin/shâ  . Try whit this one:&lt;BR /&gt;&lt;BR /&gt;for i in `cat /etc/passwd`&lt;BR /&gt;do&lt;BR /&gt;echo $i | awk '{ sub("/usr/bin/old/sh","usr/bin/sh"); print $0 }' &amp;gt;&amp;gt; /tmp/newpasswd&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;this routing dosenâ  t work if the lines in the file has bl</description>
      <pubDate>Wed, 26 May 2004 10:03:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ch-11-shell-script-needed/m-p/3287498#M882710</guid>
      <dc:creator>Thork</dc:creator>
      <dc:date>2004-05-26T10:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Ch. 11 Shell Script Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ch-11-shell-script-needed/m-p/3287499#M882711</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I agree with Mark only one more addition:&lt;BR /&gt;&lt;BR /&gt;sed "s/\/usr\/bin\/old\/sh$/\/usr\/bin\/sh/" /etc/passwd &amp;gt; /etc/passwd.new &amp;amp;&amp;amp; mv /etc/passwd.new /etc/passwd&lt;BR /&gt;&lt;BR /&gt;add the "$" after the \/usr\/bin\/old\/sh$ to make sure that only the last item of each entry is changed. &lt;BR /&gt;&lt;BR /&gt;manish.</description>
      <pubDate>Wed, 26 May 2004 10:05:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ch-11-shell-script-needed/m-p/3287499#M882711</guid>
      <dc:creator>Manish Srivastava</dc:creator>
      <dc:date>2004-05-26T10:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: Ch. 11 Shell Script Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ch-11-shell-script-needed/m-p/3287500#M882712</link>
      <description>for i in `cut -d : -f1`&lt;BR /&gt;do&lt;BR /&gt;/usr/sbin/usermod -s /usr/bin/sh $i&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Wed, 26 May 2004 10:09:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ch-11-shell-script-needed/m-p/3287500#M882712</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-05-26T10:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: Ch. 11 Shell Script Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ch-11-shell-script-needed/m-p/3287501#M882713</link>
      <description>Typo in my earlier post.&lt;BR /&gt;&lt;BR /&gt;cp /etc/passwd /etc/passwd.bak&lt;BR /&gt;for i in `cut -d : -f1 /etc/passwd`&lt;BR /&gt;do&lt;BR /&gt;/usr/sbin/usermod -s /usr/bin/sh $i&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Wed, 26 May 2004 10:11:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ch-11-shell-script-needed/m-p/3287501#M882713</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-05-26T10:11:16Z</dc:date>
    </item>
  </channel>
</rss>

