<?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: changing contents of a file that can only be viewed using strings??? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032638#M132893</link>
    <description>Sorry Massimo, that's not going to work.  The file is not simple text.  I can do this:&lt;BR /&gt;&lt;BR /&gt;1.  strings file1 &amp;gt; file2.txt&lt;BR /&gt;2.  vi file2.txt (make my simple change in this text file)&lt;BR /&gt;&lt;BR /&gt;I still need to know how to change the file from file2.txt to the original format.&lt;BR /&gt;&lt;BR /&gt;I am attaching the original file to see what I am talking about (named shell.so), I need to change the path shown from /oradata to /oradata2.</description>
    <pubDate>Thu, 24 Jul 2003 14:58:55 GMT</pubDate>
    <dc:creator>MAD_2</dc:creator>
    <dc:date>2003-07-24T14:58:55Z</dc:date>
    <item>
      <title>changing contents of a file that can only be viewed using strings???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032632#M132887</link>
      <description>I have a file that is not simple text but rather seems to be compiled.&lt;BR /&gt;&lt;BR /&gt;I can view it using strings, however I need to change a line of the text.&lt;BR /&gt;&lt;BR /&gt;Can I use strings to redirect the contents to a simple text file and then is there a way to redirect that changed file to the format of the original file that I can view with "strings"???&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Thu, 24 Jul 2003 14:46:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032632#M132887</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2003-07-24T14:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: changing contents of a file that can only be viewed using strings???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032633#M132888</link>
      <description>Hi,&lt;BR /&gt;you can try, but at your own risk, to change the string using sed&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;cat yourfile | sed s/textin/textout/ &amp;gt; yournewfile.&lt;BR /&gt;&lt;BR /&gt;Take a backup of that file, before.&lt;BR /&gt;&lt;BR /&gt;Otherwise, if is is not very big, get an exadecimal editor, like ultraedit32 on windows, change whatever you want and then take the file back up hpux.&lt;BR /&gt;&lt;BR /&gt;remember to transfer the file using binary mode.&lt;BR /&gt;&lt;BR /&gt;  Massimo&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Jul 2003 14:51:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032633#M132888</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-07-24T14:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: changing contents of a file that can only be viewed using strings???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032634#M132889</link>
      <description>You need an editor that will handle binary data. One of the best is hexedit, available from any of the HP-UX Porting Centre's. Be sure to downloand and swinstall the dependent packages as well.Hexedit is very powerful and easy to use.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Development/Tools/hexedit-0.9.7/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Development/Tools/hexedit-0.9.7/&lt;/A&gt;</description>
      <pubDate>Thu, 24 Jul 2003 14:52:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032634#M132889</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-07-24T14:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: changing contents of a file that can only be viewed using strings???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032635#M132890</link>
      <description>Adam,&lt;BR /&gt;&lt;BR /&gt;I guess I'd try that on a test copy of the file before I touched the real one.  Sounds risky to me.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Jul 2003 14:52:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032635#M132890</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-07-24T14:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: changing contents of a file that can only be viewed using strings???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032636#M132891</link>
      <description>Hi Adam:&lt;BR /&gt;&lt;BR /&gt;No, you cannot rely on the output of 'strings'.&lt;BR /&gt;&lt;BR /&gt;You would need to know the exact data layout; read the binary file with a C-program; modify the data so read; and write it again.&lt;BR /&gt;&lt;BR /&gt;'strings' simply reports what is can by finding four or more ASCII printing characters.  You will *not* necessarily see all data!&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 24 Jul 2003 14:52:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032636#M132891</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2003-07-24T14:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: changing contents of a file that can only be viewed using strings???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032637#M132892</link>
      <description>One more thing. Since you mentioned that this "seems to be compiled" and is thus an executable, you will only be able to alter your string to something of no greater length than the current string. If you need to shorten the string, pad it with spaces or better still NUL's. &lt;BR /&gt;</description>
      <pubDate>Thu, 24 Jul 2003 14:58:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032637#M132892</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-07-24T14:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: changing contents of a file that can only be viewed using strings???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032638#M132893</link>
      <description>Sorry Massimo, that's not going to work.  The file is not simple text.  I can do this:&lt;BR /&gt;&lt;BR /&gt;1.  strings file1 &amp;gt; file2.txt&lt;BR /&gt;2.  vi file2.txt (make my simple change in this text file)&lt;BR /&gt;&lt;BR /&gt;I still need to know how to change the file from file2.txt to the original format.&lt;BR /&gt;&lt;BR /&gt;I am attaching the original file to see what I am talking about (named shell.so), I need to change the path shown from /oradata to /oradata2.</description>
      <pubDate>Thu, 24 Jul 2003 14:58:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032638#M132893</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2003-07-24T14:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: changing contents of a file that can only be viewed using strings???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032639#M132894</link>
      <description>Oh, by the way, I never intended to work on the original file, I will leave that one alone until I know what I do works, whatever that may be.  Thanks everyone for your responses, i guess there is no easy way to fix this one.</description>
      <pubDate>Thu, 24 Jul 2003 15:04:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032639#M132894</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2003-07-24T15:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: changing contents of a file that can only be viewed using strings???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032640#M132895</link>
      <description>Hi Adam,&lt;BR /&gt;&lt;BR /&gt;Running strings is a one-way process.  Once you've done a strings yourbinaryfile &amp;gt;file2.txt then you've lost ALL the data EXCEPT for the stuff that strings believes is readable text (ie words of 4 chars or more.)&lt;BR /&gt;&lt;BR /&gt;So - anything you then do with file2.txt after you edit it will not be able to be put back into a working state due to the missing stuff.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;&lt;BR /&gt;Darren.</description>
      <pubDate>Thu, 24 Jul 2003 15:11:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032640#M132895</guid>
      <dc:creator>Darren Prior</dc:creator>
      <dc:date>2003-07-24T15:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: changing contents of a file that can only be viewed using strings???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032641#M132896</link>
      <description>Hi,&lt;BR /&gt;if you tried it and didn't work, the follow Clay's hint and get an hexadecimal editor, either on windows or on hpux, whichever is simpler for you.&lt;BR /&gt;&lt;BR /&gt;Since file is short, i will use uedit32, i always have it on my pc, this is why i suggested it to you :)&lt;BR /&gt;&lt;BR /&gt;   Massimo&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Jul 2003 15:15:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032641#M132896</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-07-24T15:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: changing contents of a file that can only be viewed using strings???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032642#M132897</link>
      <description>Re-reading one of your earlier comments; it might be easier for you to link /oradata2 to /oradata as it's unlikely that you'll be able to lengthen the string in the .so file.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;&lt;BR /&gt;Darren.</description>
      <pubDate>Thu, 24 Jul 2003 15:17:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-contents-of-a-file-that-can-only-be-viewed-using/m-p/3032642#M132897</guid>
      <dc:creator>Darren Prior</dc:creator>
      <dc:date>2003-07-24T15:17:33Z</dc:date>
    </item>
  </channel>
</rss>

