<?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: passwd script frustration in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-script-frustration/m-p/5129357#M449403</link>
    <description>Both are wonderful suggestions.  But, my problem was that I ftp'd the file over from windows and it had the ^M at the end of every line.  :)  I hadn't noticed because I was using "more" instead of "vi" on the file.&lt;BR /&gt;&lt;BR /&gt;It's always those little things that get you.&lt;BR /&gt;&lt;BR /&gt;Thanks for your help!</description>
    <pubDate>Thu, 11 Sep 2008 16:50:36 GMT</pubDate>
    <dc:creator>Stephanie L Davenport</dc:creator>
    <dc:date>2008-09-11T16:50:36Z</dc:date>
    <item>
      <title>passwd script frustration</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-script-frustration/m-p/5129354#M449400</link>
      <description>Ok, I'm trying to get information about disabled users on my system.  I wrote a simple for loop but, it is not working the way I want it to.&lt;BR /&gt;&lt;BR /&gt;#&amp;gt; for a in `cat listOfUsers `;do&lt;BR /&gt;&amp;gt;grep $a /etc/passwd | awk -F: '{print $1 ":" $6}' &amp;gt;&amp;gt; Info.txt&lt;BR /&gt;&amp;gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But, all I get is the information on the last person in the list.  What am I doing wrong?</description>
      <pubDate>Thu, 11 Sep 2008 15:36:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-script-frustration/m-p/5129354#M449400</guid>
      <dc:creator>Stephanie L Davenport</dc:creator>
      <dc:date>2008-09-11T15:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: passwd script frustration</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-script-frustration/m-p/5129355#M449401</link>
      <description>Without trying this, it seems fine.  What is the format for listOfUsers?&lt;BR /&gt;&lt;BR /&gt;If there is one name per line, you could use:&lt;BR /&gt;grep -f listOfUsers /etc/passwd | awk -F: '{print $1 ":" $6}' &amp;gt;&amp;gt; Info.txt</description>
      <pubDate>Thu, 11 Sep 2008 15:56:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-script-frustration/m-p/5129355#M449401</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-09-11T15:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: passwd script frustration</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-script-frustration/m-p/5129356#M449402</link>
      <description>&lt;!--!*#--&gt;Hi Stephanie:&lt;BR /&gt;&lt;BR /&gt;What does your file, 'ListOfUsers' look like?  If it has one user (name) per line, this should work.&lt;BR /&gt;&lt;BR /&gt;That said, you can eliminate *two* extra processes! --- a 'cat' and a 'grep'.  Let the shell read and split the fields.  Let 'awk' match what you need and print it.&lt;BR /&gt;&lt;BR /&gt;#/usr/sin/sh&lt;BR /&gt;while read NAME X; do&lt;BR /&gt;    awk -v NAME=${NAME} -F: '$1==NAME {print $1 ":" $6}' /etc/passwd&lt;BR /&gt;done &amp;lt; listOfUsers &amp;gt; info.txt&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Sep 2008 15:58:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-script-frustration/m-p/5129356#M449402</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-09-11T15:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: passwd script frustration</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-script-frustration/m-p/5129357#M449403</link>
      <description>Both are wonderful suggestions.  But, my problem was that I ftp'd the file over from windows and it had the ^M at the end of every line.  :)  I hadn't noticed because I was using "more" instead of "vi" on the file.&lt;BR /&gt;&lt;BR /&gt;It's always those little things that get you.&lt;BR /&gt;&lt;BR /&gt;Thanks for your help!</description>
      <pubDate>Thu, 11 Sep 2008 16:50:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-script-frustration/m-p/5129357#M449403</guid>
      <dc:creator>Stephanie L Davenport</dc:creator>
      <dc:date>2008-09-11T16:50:36Z</dc:date>
    </item>
  </channel>
</rss>

