<?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: Spliting and merging files in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920769#M824925</link>
    <description>A couple of options: -&lt;BR /&gt;&lt;BR /&gt;Excel can import with any field separator, so you should be able to select "space" as a field separator.&lt;BR /&gt;&lt;BR /&gt;For cut, you can use the option -d" " to set "space" as a delimiter.&lt;BR /&gt;&lt;BR /&gt;Or you can use awk which by default will allow any whitespace (space, tab etc)&lt;BR /&gt;&lt;BR /&gt;awk '{print $1,$3}' filename</description>
    <pubDate>Wed, 24 Aug 2005 09:57:53 GMT</pubDate>
    <dc:creator>Simon Hargrave</dc:creator>
    <dc:date>2005-08-24T09:57:53Z</dc:date>
    <item>
      <title>Spliting and merging files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920767#M824923</link>
      <description>Hi all&lt;BR /&gt;&lt;BR /&gt;  i have got a output of counters in the following format&lt;BR /&gt;Counter  = 12&lt;BR /&gt;coun  = 234&lt;BR /&gt; &lt;BR /&gt; now i want to open the file in Microsoft excel, sheet the problem is excel sheet need a tab difference to recognize the difference between any two words otherwise it will think the whole as a single word.&lt;BR /&gt;&lt;BR /&gt; and cut command is also failed to distinguish the counter and values as fields it is thinking it as a single filed.&lt;BR /&gt;&lt;BR /&gt; how to proceed now?&lt;BR /&gt;  &lt;BR /&gt;There e are lot of counters like this and values will continuously increasing.&lt;BR /&gt;&lt;BR /&gt; From my view i think easiest way is to cut the alphabets and numerical separately merging it with a tab space.&lt;BR /&gt;&lt;BR /&gt;  plz help my providing a solution&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Aug 2005 09:51:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920767#M824923</guid>
      <dc:creator>jayachandran.g</dc:creator>
      <dc:date>2005-08-24T09:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: Spliting and merging files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920768#M824924</link>
      <description>If I understand correctly, you want to put the words into one field and the numbers into the next field.  What you can do prior to opening the file in Excel is replace the " = " with a comma (,).  Excel should be able to use the comma seperated file to properly populate the fields in your spreadsheet.</description>
      <pubDate>Wed, 24 Aug 2005 09:55:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920768#M824924</guid>
      <dc:creator>Pat Lieberg</dc:creator>
      <dc:date>2005-08-24T09:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Spliting and merging files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920769#M824925</link>
      <description>A couple of options: -&lt;BR /&gt;&lt;BR /&gt;Excel can import with any field separator, so you should be able to select "space" as a field separator.&lt;BR /&gt;&lt;BR /&gt;For cut, you can use the option -d" " to set "space" as a delimiter.&lt;BR /&gt;&lt;BR /&gt;Or you can use awk which by default will allow any whitespace (space, tab etc)&lt;BR /&gt;&lt;BR /&gt;awk '{print $1,$3}' filename</description>
      <pubDate>Wed, 24 Aug 2005 09:57:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920769#M824925</guid>
      <dc:creator>Simon Hargrave</dc:creator>
      <dc:date>2005-08-24T09:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: Spliting and merging files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920770#M824926</link>
      <description>As Pat indicated using a comma in plain text files works great as field separators in Excel.  It's how we get data for the spreadsheet folks extracted from the database, and it works fine.</description>
      <pubDate>Wed, 24 Aug 2005 09:58:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920770#M824926</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2005-08-24T09:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Spliting and merging files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920771#M824927</link>
      <description>jayachandran,&lt;BR /&gt;Let me understan better, the entire file is one colum with counter=number? correct? and also it has many lines with the same format the difference is that some are Couunter and some are count, correct?&lt;BR /&gt;&lt;BR /&gt;if that is correct you can try the follwiing&lt;BR /&gt;&lt;BR /&gt;cat &lt;FILENAME&gt; | while read x&lt;BR /&gt;do&lt;BR /&gt;echo "$x \n" &amp;gt;&amp;gt; newfile&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hope it helps&lt;/FILENAME&gt;</description>
      <pubDate>Wed, 24 Aug 2005 10:00:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920771#M824927</guid>
      <dc:creator>Juan M Leon</dc:creator>
      <dc:date>2005-08-24T10:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: Spliting and merging files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920772#M824928</link>
      <description>&lt;BR /&gt;DATAFILE=/path/to/my/datafile&lt;BR /&gt;NEWFILE=/path/to/tab/delimited/file&lt;BR /&gt;COUNTERS_PER_LINE_in_EXCEL=15 # modify this as you wish&lt;BR /&gt;&lt;BR /&gt;cell_ctr=0&lt;BR /&gt;&lt;BR /&gt;cat $DATAFILE|while read a b c&lt;BR /&gt;do&lt;BR /&gt;printf $c"\t" &amp;gt;&amp;gt; $NEWFILE&lt;BR /&gt;&lt;BR /&gt;(( cell_ctr=$cell_ctr+1 ))&lt;BR /&gt;if [ $cell_ctr -gt $COUNTERS_PER_LINE_in_EXCEL ]&lt;BR /&gt;then&lt;BR /&gt;printf "\n" &amp;gt;&amp;gt; $NEWFILE&lt;BR /&gt;cell_ctr=0&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Aug 2005 10:01:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920772#M824928</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2005-08-24T10:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Spliting and merging files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920773#M824929</link>
      <description>Ok I was confused with the question. what I suggested  before is not going to helps you. I incline to use Simon idea but add somethin else at the end of his line&lt;BR /&gt;&lt;BR /&gt;awk -F= '{print $1","$2}' filename &amp;gt; newfilename</description>
      <pubDate>Wed, 24 Aug 2005 10:04:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920773#M824929</guid>
      <dc:creator>Juan M Leon</dc:creator>
      <dc:date>2005-08-24T10:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: Spliting and merging files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920774#M824930</link>
      <description>Hi All&lt;BR /&gt;&lt;BR /&gt; Thanks for all u'r valuble response.&lt;BR /&gt;Pat you have simply slapped me.. with your command, it is excellent. but comma (,) did not work i don't know exactly the reson but insted of comma(,) i have inserted a tab space&lt;BR /&gt;:%s/=/   /g&lt;BR /&gt;and it done the magic. now even cut command is looking it as a seperate field with may help me when i have same counters from different machines to merge in the same file.</description>
      <pubDate>Wed, 24 Aug 2005 10:06:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920774#M824930</guid>
      <dc:creator>jayachandran.g</dc:creator>
      <dc:date>2005-08-24T10:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Spliting and merging files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920775#M824931</link>
      <description>Yaa i got to the loop now&lt;BR /&gt;i have two files &lt;BR /&gt;one &lt;BR /&gt;filed1    field2&lt;BR /&gt;counter    3&lt;BR /&gt;count      3&lt;BR /&gt;&lt;BR /&gt;another file &lt;BR /&gt;&lt;BR /&gt;filed1    field2&lt;BR /&gt;counter    6&lt;BR /&gt;count      7&lt;BR /&gt;&lt;BR /&gt;now i want to do&lt;BR /&gt;&lt;BR /&gt;file1     file1    file2&lt;BR /&gt;field1    filed2   field2&lt;BR /&gt;counter    3         6&lt;BR /&gt;count      3         7&lt;BR /&gt;&lt;BR /&gt;note the counter and its values are not the same.&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Aug 2005 10:12:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920775#M824931</guid>
      <dc:creator>jayachandran.g</dc:creator>
      <dc:date>2005-08-24T10:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Spliting and merging files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920776#M824932</link>
      <description>Jayachandran,&lt;BR /&gt;&lt;BR /&gt;The default delimiter for cut is &lt;TAB&gt; therefore you need to specify the one you need to use with the "-d" option i.e.&lt;BR /&gt;&lt;BR /&gt;# cut -d" " &lt;FILENAME&gt;&lt;BR /&gt;&lt;BR /&gt;In your case it shoud be:&lt;BR /&gt;&lt;BR /&gt;# cut -d"=" -f&lt;FIELDS_YOU_WANT&gt; filename&lt;/FIELDS_YOU_WANT&gt;&lt;/FILENAME&gt;&lt;/TAB&gt;</description>
      <pubDate>Wed, 24 Aug 2005 10:27:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920776#M824932</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2005-08-24T10:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Spliting and merging files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920777#M824933</link>
      <description>I have tred the psste command but it failed.&lt;BR /&gt;paste file1 file2&lt;BR /&gt; output was like this &lt;BR /&gt;ffile1   file1&lt;BR /&gt;ifiled1  filed2&lt;BR /&gt;l&lt;BR /&gt;e&lt;BR /&gt;2&lt;BR /&gt;&lt;BR /&gt;f&lt;BR /&gt;i&lt;BR /&gt;e&lt;BR /&gt;l&lt;BR /&gt;d&lt;BR /&gt;2&lt;BR /&gt;&lt;BR /&gt;7counter  3&lt;BR /&gt;6count    3&lt;BR /&gt;paste file2 file1 (not happening)</description>
      <pubDate>Wed, 24 Aug 2005 10:30:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920777#M824933</guid>
      <dc:creator>jayachandran.g</dc:creator>
      <dc:date>2005-08-24T10:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: Spliting and merging files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920778#M824934</link>
      <description>Hi All&lt;BR /&gt;&lt;BR /&gt; to be clear on what we are taking i'm opening a new case.&lt;BR /&gt;&lt;BR /&gt;thanks to all</description>
      <pubDate>Wed, 24 Aug 2005 10:35:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/spliting-and-merging-files/m-p/4920778#M824934</guid>
      <dc:creator>jayachandran.g</dc:creator>
      <dc:date>2005-08-24T10:35:14Z</dc:date>
    </item>
  </channel>
</rss>

