<?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 file manipulation with scripts in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/file-manipulation-with-scripts/m-p/3351604#M192555</link>
    <description>Hi All...&lt;BR /&gt;I have a file that looks like this:&lt;BR /&gt;&lt;BR /&gt;User: frencht&lt;BR /&gt;License: panth.5.0&lt;BR /&gt;License: panth_des.5.0&lt;BR /&gt;User: miedicr&lt;BR /&gt;License: panth_des.5.0&lt;BR /&gt;User: patriet&lt;BR /&gt;License: panth.5.0&lt;BR /&gt;License: panth_des.5.0&lt;BR /&gt;User: gormanl&lt;BR /&gt;License: panth.5.0&lt;BR /&gt;License: panth_des.5.0&lt;BR /&gt;User: bozzad&lt;BR /&gt;License: panth_des.5.0&lt;BR /&gt;&lt;BR /&gt;It is a username followed by any number of license lines for licenses that are checked out.  How can I change the format of this file so that it looks like this:&lt;BR /&gt;&lt;BR /&gt;User: frencht panth.5.0 panth_des.5.0&lt;BR /&gt;User: miedicr panth_des.5.0&lt;BR /&gt;User: patriet panth.5.0 panth_des.5.0&lt;BR /&gt;User: gormanl panth.5.0 panth_des.5.0&lt;BR /&gt;User: bozzad panth_des.5.0&lt;BR /&gt;&lt;BR /&gt;I am sure there is a relatively simple way, but I've been messing around with awk and sed and haven't quite got it.  Please help!&lt;BR /&gt;Thanks,&lt;BR /&gt;Theresa</description>
    <pubDate>Fri, 06 Aug 2004 11:52:19 GMT</pubDate>
    <dc:creator>Theresa Patrie</dc:creator>
    <dc:date>2004-08-06T11:52:19Z</dc:date>
    <item>
      <title>file manipulation with scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-manipulation-with-scripts/m-p/3351604#M192555</link>
      <description>Hi All...&lt;BR /&gt;I have a file that looks like this:&lt;BR /&gt;&lt;BR /&gt;User: frencht&lt;BR /&gt;License: panth.5.0&lt;BR /&gt;License: panth_des.5.0&lt;BR /&gt;User: miedicr&lt;BR /&gt;License: panth_des.5.0&lt;BR /&gt;User: patriet&lt;BR /&gt;License: panth.5.0&lt;BR /&gt;License: panth_des.5.0&lt;BR /&gt;User: gormanl&lt;BR /&gt;License: panth.5.0&lt;BR /&gt;License: panth_des.5.0&lt;BR /&gt;User: bozzad&lt;BR /&gt;License: panth_des.5.0&lt;BR /&gt;&lt;BR /&gt;It is a username followed by any number of license lines for licenses that are checked out.  How can I change the format of this file so that it looks like this:&lt;BR /&gt;&lt;BR /&gt;User: frencht panth.5.0 panth_des.5.0&lt;BR /&gt;User: miedicr panth_des.5.0&lt;BR /&gt;User: patriet panth.5.0 panth_des.5.0&lt;BR /&gt;User: gormanl panth.5.0 panth_des.5.0&lt;BR /&gt;User: bozzad panth_des.5.0&lt;BR /&gt;&lt;BR /&gt;I am sure there is a relatively simple way, but I've been messing around with awk and sed and haven't quite got it.  Please help!&lt;BR /&gt;Thanks,&lt;BR /&gt;Theresa</description>
      <pubDate>Fri, 06 Aug 2004 11:52:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-manipulation-with-scripts/m-p/3351604#M192555</guid>
      <dc:creator>Theresa Patrie</dc:creator>
      <dc:date>2004-08-06T11:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: file manipulation with scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-manipulation-with-scripts/m-p/3351605#M192556</link>
      <description>Hi,&lt;BR /&gt;This should work:&lt;BR /&gt;&lt;BR /&gt;awk -F: '/User/ {printf("\nUser:%s",$2);continue}&lt;BR /&gt;{printf("%s ",$2)}&lt;BR /&gt;END {print ""}' FILE | awk 'NR&amp;gt;1 {print}'&lt;BR /&gt;&lt;BR /&gt;If empty string in the output is not a problem, remove second awk &lt;BR /&gt;HTH</description>
      <pubDate>Fri, 06 Aug 2004 12:07:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-manipulation-with-scripts/m-p/3351605#M192556</guid>
      <dc:creator>Victor Fridyev</dc:creator>
      <dc:date>2004-08-06T12:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: file manipulation with scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-manipulation-with-scripts/m-p/3351606#M192557</link>
      <description>Thank You Victor...it absolutely does work...perfectly!</description>
      <pubDate>Fri, 06 Aug 2004 12:24:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-manipulation-with-scripts/m-p/3351606#M192557</guid>
      <dc:creator>Theresa Patrie</dc:creator>
      <dc:date>2004-08-06T12:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: file manipulation with scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-manipulation-with-scripts/m-p/3351607#M192558</link>
      <description>We can do it simply as,&lt;BR /&gt;&lt;BR /&gt; awk -F ":" '{ if ( $1 == "User" ) printf("\n%s",$2)&lt;BR /&gt; if ( $1 == "License" ) printf("%s",$2) } END { print ("\n") }' filename&lt;BR /&gt;&lt;BR /&gt; frencht panth.5.0 panth_des.5.0&lt;BR /&gt; miedicr panth_des.5.0&lt;BR /&gt; patriet panth.5.0 panth_des.5.0&lt;BR /&gt; gormanl panth.5.0 panth_des.5.0&lt;BR /&gt; bozzad panth_des.5.0&lt;BR /&gt;&lt;BR /&gt;- muthu</description>
      <pubDate>Sat, 07 Aug 2004 01:38:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-manipulation-with-scripts/m-p/3351607#M192558</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-08-07T01:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: file manipulation with scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-manipulation-with-scripts/m-p/3351608#M192559</link>
      <description>Same idea, different syntax.  Thanks!</description>
      <pubDate>Wed, 11 Aug 2004 12:00:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-manipulation-with-scripts/m-p/3351608#M192559</guid>
      <dc:creator>Theresa Patrie</dc:creator>
      <dc:date>2004-08-11T12:00:14Z</dc:date>
    </item>
  </channel>
</rss>

