<?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: HELP in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661339#M48468</link>
    <description>awk ' BEGIN { firsttime = 1 }&lt;BR /&gt;{&lt;BR /&gt;  if ( firsttime == 1 ) {&lt;BR /&gt;     firstline = $0&lt;BR /&gt;     firsttime = 0&lt;BR /&gt;  } else&lt;BR /&gt;  {&lt;BR /&gt;     print firstline, $0&lt;BR /&gt;     firstline = ""&lt;BR /&gt;     firsttime = 1&lt;BR /&gt;  }&lt;BR /&gt;}&lt;BR /&gt;END {&lt;BR /&gt;   if ( firsttime == 0 ) { print firstline }&lt;BR /&gt;}'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
    <pubDate>Fri, 08 Feb 2002 13:44:09 GMT</pubDate>
    <dc:creator>harry d brown jr</dc:creator>
    <dc:date>2002-02-08T13:44:09Z</dc:date>
    <item>
      <title>HELP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661336#M48465</link>
      <description>I'm having a heck of a time on something very simple. I have in input file that looks like&lt;BR /&gt;02/06/02 19:00:09&lt;BR /&gt;02/07/02 02:29:22&lt;BR /&gt; However I want to change it before I read it.&lt;BR /&gt;I want it all on the top line with a space in between like:&lt;BR /&gt;02/06/02 19:00:09 02/07/02 02:29:22&lt;BR /&gt;I need to do this in a script, not on command line. Any ideas greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Bob&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 08 Feb 2002 13:36:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661336#M48465</guid>
      <dc:creator>Nobody's Hero</dc:creator>
      <dc:date>2002-02-08T13:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: HELP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661337#M48466</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Use $(cat $file) &lt;BR /&gt;&lt;BR /&gt;Then you have 1 line&lt;BR /&gt;&lt;BR /&gt;ex&lt;BR /&gt;&lt;BR /&gt;echo $(cat $file)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;         steve Steel</description>
      <pubDate>Fri, 08 Feb 2002 13:40:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661337#M48466</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2002-02-08T13:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: HELP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661338#M48467</link>
      <description>Only 2 lines per file, or multiples of 2 lines?&lt;BR /&gt;&lt;BR /&gt;cat /tmp/filename |awk '{printf ("%s %s ", $1, $2)}' &lt;BR /&gt;&lt;BR /&gt;will print each entry without putting a line feed in. Only will work for 2 lines total per file.&lt;BR /&gt;&lt;BR /&gt;Share and Enjoy! Ian&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 08 Feb 2002 13:43:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661338#M48467</guid>
      <dc:creator>ian Dennison</dc:creator>
      <dc:date>2002-02-08T13:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: HELP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661339#M48468</link>
      <description>awk ' BEGIN { firsttime = 1 }&lt;BR /&gt;{&lt;BR /&gt;  if ( firsttime == 1 ) {&lt;BR /&gt;     firstline = $0&lt;BR /&gt;     firsttime = 0&lt;BR /&gt;  } else&lt;BR /&gt;  {&lt;BR /&gt;     print firstline, $0&lt;BR /&gt;     firstline = ""&lt;BR /&gt;     firsttime = 1&lt;BR /&gt;  }&lt;BR /&gt;}&lt;BR /&gt;END {&lt;BR /&gt;   if ( firsttime == 0 ) { print firstline }&lt;BR /&gt;}'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Fri, 08 Feb 2002 13:44:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661339#M48468</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-02-08T13:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: HELP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661340#M48469</link>
      <description>Hi Robert:&lt;BR /&gt;&lt;BR /&gt;This will combine any number of lines:&lt;BR /&gt;cat myfile | while read X&lt;BR /&gt;  do&lt;BR /&gt;     echo "${X} \c"&lt;BR /&gt;  done&lt;BR /&gt;echo&lt;BR /&gt;</description>
      <pubDate>Fri, 08 Feb 2002 13:46:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661340#M48469</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-02-08T13:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: HELP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661341#M48470</link>
      <description>Uhmmm....don't know if this will work:&lt;BR /&gt;&lt;BR /&gt;cat file | awk 'BEGIN {ORS=" "} {print $0}' -&lt;BR /&gt;&lt;BR /&gt;This will set the output record separator to a single space and then print each line in the file.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Vincent</description>
      <pubDate>Fri, 08 Feb 2002 13:49:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661341#M48470</guid>
      <dc:creator>Vincent Stedema</dc:creator>
      <dc:date>2002-02-08T13:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: HELP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661342#M48471</link>
      <description>Thanks everyone, Wish I could think that fast.&lt;BR /&gt;After 6 years I sometimes still feel like a novice. Script is not my bag. Thanks Clay, I used yours, less typing. Thanks everyone, great ideas.&lt;BR /&gt;&lt;BR /&gt;Bob</description>
      <pubDate>Fri, 08 Feb 2002 13:56:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661342#M48471</guid>
      <dc:creator>Nobody's Hero</dc:creator>
      <dc:date>2002-02-08T13:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: HELP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661343#M48472</link>
      <description>Hi Robert,&lt;BR /&gt;&lt;BR /&gt;if you have to do this with a script, you could use the awk to manage it:&lt;BR /&gt;BEGIN { line = "" }&lt;BR /&gt;{&lt;BR /&gt;for ( NR &amp;lt;= 2 ) {&lt;BR /&gt;line = line " " $0 }&lt;BR /&gt;{&lt;BR /&gt;print line&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;the script can be called as follows:&lt;BR /&gt;&lt;BR /&gt;awk -f script_name file_name&lt;BR /&gt;&lt;BR /&gt;(if the file has more lines than two you have to change the script.... )&lt;BR /&gt;&lt;BR /&gt;Allways stay on the bright side of life!&lt;BR /&gt;&lt;BR /&gt;Peter</description>
      <pubDate>Fri, 08 Feb 2002 13:56:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661343#M48472</guid>
      <dc:creator>Peter Kloetgen</dc:creator>
      <dc:date>2002-02-08T13:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: HELP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661344#M48473</link>
      <description>Hi Robert:&lt;BR /&gt;&lt;BR /&gt;If it were only the first two lines of the file that you wanted joined into one, then you could use this:&lt;BR /&gt;&lt;BR /&gt;# awk '{if (NR&amp;lt;3) {X=$0;getline;X=X" "$0;print X} else {print $0}}' myfile&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 08 Feb 2002 14:01:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661344#M48473</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-02-08T14:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: HELP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661345#M48474</link>
      <description>Hi Bob,&lt;BR /&gt;&lt;BR /&gt;This will "join" pairs of lines no matter how many are in the file:&lt;BR /&gt;&lt;BR /&gt;while read line1&lt;BR /&gt;do&lt;BR /&gt;        read line2&lt;BR /&gt;        echo $line1 $line2&lt;BR /&gt;done &lt;FILE&gt;&lt;/FILE&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Fri, 08 Feb 2002 14:57:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661345#M48474</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2002-02-08T14:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: HELP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661346#M48475</link>
      <description>I think you can also do this:&lt;BR /&gt;cat $file |xargs echo &lt;BR /&gt;&lt;BR /&gt;Greg</description>
      <pubDate>Fri, 08 Feb 2002 21:10:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help/m-p/2661346#M48475</guid>
      <dc:creator>Greg Stark_1</dc:creator>
      <dc:date>2002-02-08T21:10:16Z</dc:date>
    </item>
  </channel>
</rss>

