<?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: How to read a data file in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432687#M859810</link>
    <description>using the command "file myfile" it shows data&lt;BR /&gt;&lt;BR /&gt;using the command more mydile the result is&lt;BR /&gt;&lt;BR /&gt;M-4M-^AM-GM-^&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 30 Nov 2004 05:13:09 GMT</pubDate>
    <dc:creator>Abdullatif M. Abdulla</dc:creator>
    <dc:date>2004-11-30T05:13:09Z</dc:date>
    <item>
      <title>How to read a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432682#M859805</link>
      <description>What is the suitable tool for reading a binary data file?&lt;BR /&gt;&lt;BR /&gt;Urgent help please&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Nov 2004 03:19:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432682#M859805</guid>
      <dc:creator>Abdullatif M. Abdulla</dc:creator>
      <dc:date>2004-11-30T03:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to read a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432683#M859806</link>
      <description>strings filename|pg&lt;BR /&gt;&lt;BR /&gt;Pipe to more if you prefer.&lt;BR /&gt;&lt;BR /&gt;Mark Syder (like the drink but spelt different)</description>
      <pubDate>Tue, 30 Nov 2004 03:21:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432683#M859806</guid>
      <dc:creator>MarkSyder</dc:creator>
      <dc:date>2004-11-30T03:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to read a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432684#M859807</link>
      <description>I have used strings and od commands but still not getting the required results....</description>
      <pubDate>Tue, 30 Nov 2004 04:39:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432684#M859807</guid>
      <dc:creator>Abdullatif M. Abdulla</dc:creator>
      <dc:date>2004-11-30T04:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to read a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432685#M859808</link>
      <description>You can also try xd (if you want hex output) or 'xd -c' if you want it 'interpreted' into ASCII.&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Nov 2004 04:49:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432685#M859808</guid>
      <dc:creator>Stephen Keane</dc:creator>
      <dc:date>2004-11-30T04:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to read a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432686#M859809</link>
      <description>It depends on what you want... If you want an exact output of what's inside, od is the tool. If you want an interpretation of its content, you will need the appropriate app (maybe the one which generate the file).&lt;BR /&gt;&lt;BR /&gt;What program did generate this file ?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Fred</description>
      <pubDate>Tue, 30 Nov 2004 05:07:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432686#M859809</guid>
      <dc:creator>Fred Ruffet</dc:creator>
      <dc:date>2004-11-30T05:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to read a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432687#M859810</link>
      <description>using the command "file myfile" it shows data&lt;BR /&gt;&lt;BR /&gt;using the command more mydile the result is&lt;BR /&gt;&lt;BR /&gt;M-4M-^AM-GM-^&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Nov 2004 05:13:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432687#M859810</guid>
      <dc:creator>Abdullatif M. Abdulla</dc:creator>
      <dc:date>2004-11-30T05:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to read a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432688#M859811</link>
      <description>Its a data file comming from switch using ftp&lt;BR /&gt;&lt;BR /&gt;Yes... I need to read the raw data</description>
      <pubDate>Tue, 30 Nov 2004 05:17:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432688#M859811</guid>
      <dc:creator>Abdullatif M. Abdulla</dc:creator>
      <dc:date>2004-11-30T05:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to read a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432689#M859812</link>
      <description>So you should use od.&lt;BR /&gt;"od -cx file" outputs your file, combining hexa and ascii output.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Fred&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Nov 2004 05:23:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432689#M859812</guid>
      <dc:creator>Fred Ruffet</dc:creator>
      <dc:date>2004-11-30T05:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to read a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432690#M859813</link>
      <description>When used the od command i got the following result which i am require.&lt;BR /&gt;0000000  264 201 307 200 001 022 203  \b   d   @   # 021   2 005   t 371&lt;BR /&gt;     b481    c780     112    8308    6440    2311    3205    74f9&lt;BR /&gt;0000020  245 006 200 004 254 026 002   3 206 001  \0 207 001 001 210 002&lt;BR /&gt;     a506    8004    ac16     233    8601      87     101    8802&lt;BR /&gt;0000040        I 211 002  \0  \a 212 005  \0 320   V   a   N 253 006 200&lt;BR /&gt;     2049    8902       7    8a05      d0    5661    4eab     680&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But the format I want is :-&lt;BR /&gt;Raw Data:    &lt;BR /&gt;  0     H' A081EA80 01128101 00820100 83086400 27080900   &lt;BR /&gt; 20     H' 20308408 64002708 09000000 A5068004 0A6E0703   &lt;BR /&gt; 40     H' 86010087 01018802 25218902 000B8A02 00CBAB06   &lt;BR /&gt; 60     H' 80040A6E 070E8C0D 48554157 45492E43 4F4D2E43   &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Any help?&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Nov 2004 23:32:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432690#M859813</guid>
      <dc:creator>Abdullatif M. Abdulla</dc:creator>
      <dc:date>2004-11-30T23:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to read a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432691#M859814</link>
      <description>This is probably about as close as you are going to get with od:&lt;BR /&gt;&lt;BR /&gt;od -A x -t x1 -v infile &amp;gt; outfile&lt;BR /&gt;&lt;BR /&gt;Another very good tool available for download from any of HP-UX Porting Centre's is "hexedit". It will display the data quite well and if you like you can modify as well.&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Nov 2004 23:40:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432691#M859814</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-11-30T23:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to read a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432692#M859815</link>
      <description>SMOP:&lt;BR /&gt;&lt;BR /&gt;---- dump.pl ----&lt;BR /&gt;&lt;BR /&gt;$file = shift @ARGV or die "Please provide file to split and # chunks";&lt;BR /&gt;open (FILE, "&amp;lt;$file") or die "Error opening $file";&lt;BR /&gt;binmode (FILE);&lt;BR /&gt;$offset = 0;&lt;BR /&gt;$block = 20;&lt;BR /&gt;while ($block == read(FILE, $buffer, $block)){&lt;BR /&gt;  printf ("%d H'%08X %08X %08X %08X %08X\n", $offset, unpack("L5",$buffer));&lt;BR /&gt;  $offset += $block;&lt;BR /&gt;  }&lt;BR /&gt;&lt;BR /&gt;------------ usage -----&lt;BR /&gt;&lt;BR /&gt;$ perl dump.pl dump.pl | head -5&lt;BR /&gt;0 H'2466696C 65203D20 73686966 74204041 52475620&lt;BR /&gt;20 H'6F722064 69652022 506C6561 73652070 726F7669&lt;BR /&gt;40 H'64652066 696C6520 746F2073 706C6974 20616E64&lt;BR /&gt;60 H'20232063 68756E6B 73223B0A 6F70656E 20284649&lt;BR /&gt;80 H'4C452C20 223C2466 696C6522 29206F72 20646965&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;----------- note -----&lt;BR /&gt;1) Hex dump, DEcimal offsets?&lt;BR /&gt;2) Left to right or Right to left?&lt;BR /&gt;3) Little-Endian or Big-Endian?&lt;BR /&gt;Check out: &lt;A href="http://www.perldoc.com/perl5.8.4/pod/func/pack.html" target="_blank"&gt;http://www.perldoc.com/perl5.8.4/pod/func/pack.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy!&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Dec 2004 00:20:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432692#M859815</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2004-12-01T00:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to read a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432693#M859816</link>
      <description>Thanks Hein&lt;BR /&gt;&lt;BR /&gt;Can you make your code more clear I am not a perl programmer:&lt;BR /&gt;&lt;BR /&gt;I excuted the code and getting the following error:-&lt;BR /&gt;syntex error in file dump.pl at line 1.next tokens "ARGV myfile"&lt;BR /&gt;Excution of dump.pl aborted due to comilation errors.&lt;BR /&gt;&lt;BR /&gt;Thands</description>
      <pubDate>Wed, 01 Dec 2004 00:44:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432693#M859816</guid>
      <dc:creator>Abdullatif M. Abdulla</dc:creator>
      <dc:date>2004-12-01T00:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to read a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432694#M859817</link>
      <description>The command to use is:&lt;BR /&gt;&lt;BR /&gt;strings &lt;FILENAME&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Isralyn&lt;/FILENAME&gt;</description>
      <pubDate>Wed, 01 Dec 2004 01:01:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432694#M859817</guid>
      <dc:creator>Isralyn Manalac_1</dc:creator>
      <dc:date>2004-12-01T01:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to read a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432695#M859818</link>
      <description>Hmmm,&lt;BR /&gt;&lt;BR /&gt;Sounds like a cut and paste error.&lt;BR /&gt;Maybe a line-wrap? Try again?&lt;BR /&gt;You did not re-type did you? Never do that! Only cut &amp;amp; paste. Not for lazyness but for correctness!&lt;BR /&gt;Looks like you might have judging by the 'syntex' in your reply. Surely the system said 'syntax' no?&lt;BR /&gt;&lt;BR /&gt;That first line is actually accidently too line (my cut and paste!)&lt;BR /&gt;&lt;BR /&gt;----- put all of this in a file: dump.pl ----&lt;BR /&gt;$file = shift @ARGV or die "Provide input file name";&lt;BR /&gt;open (FILE, "&amp;lt;$file") or die "Error opening $file";&lt;BR /&gt;binmode (FILE);&lt;BR /&gt;$offset = 0;&lt;BR /&gt;$block = 20;&lt;BR /&gt;while ($block == read(FILE, $buffer, $block)){&lt;BR /&gt;printf ("%d H'%08X %08X %08X %08X %08X\n", $offset, unpack("L5",$buffer));&lt;BR /&gt;$offset += $block;&lt;BR /&gt;}&lt;BR /&gt;------ end of dump.pl ----&lt;BR /&gt;&lt;BR /&gt;Now provide that file to perl as argument:&lt;BR /&gt;&lt;BR /&gt;perl dump.pl &lt;YOUR-DATA-FILE&gt;&lt;BR /&gt;&lt;BR /&gt;A little explanation.&lt;BR /&gt;- the first line just picks up a first argument and remembers it in variable $file.&lt;BR /&gt;- next, try to open that file&lt;BR /&gt;- switch to binary mode&lt;BR /&gt;- initialize offset and size params.&lt;BR /&gt;- read a block, into buffer variable. THis returns the number of bytes read. Processing continutes while that is the same as the number of bytes requests.&lt;BR /&gt;- the printf is where the real magic happens in the argument list. We don't give a list of 5 variables as 'usual' but the result from an 'unpack' which is a list of 5 values.&lt;BR /&gt;- The unpack argument "L5" tell the system to interpret the 20 bytes read as 5 times a 32-bit integer (see perl online doc!).&lt;BR /&gt;&lt;BR /&gt;Try again!&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/YOUR-DATA-FILE&gt;</description>
      <pubDate>Wed, 01 Dec 2004 01:23:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432695#M859818</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2004-12-01T01:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to read a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432696#M859819</link>
      <description>Hi Hein&lt;BR /&gt;&lt;BR /&gt;Thanks for you support &lt;BR /&gt;&lt;BR /&gt;Yes i did cut and paste from begining and i am still getting the error now is:&lt;BR /&gt;syntax error in file dump.pl at line 1, next 2 tokens "@ARGV or"&lt;BR /&gt;syntax error in file dump.pl at line 2, next 2 tokens ")or"&lt;BR /&gt;Excution of dump.pl aborted due to compilation errors.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I am using 10.20 OS.I have attached the binary file&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Dec 2004 01:42:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432696#M859819</guid>
      <dc:creator>Abdullatif M. Abdulla</dc:creator>
      <dc:date>2004-12-01T01:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to read a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432697#M859820</link>
      <description>Thanks Hein&lt;BR /&gt;&lt;BR /&gt;It worked fine.....</description>
      <pubDate>Wed, 01 Dec 2004 03:40:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-read-a-data-file/m-p/3432697#M859820</guid>
      <dc:creator>Abdullatif M. Abdulla</dc:creator>
      <dc:date>2004-12-01T03:40:20Z</dc:date>
    </item>
  </channel>
</rss>

