<?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: Finding a string in a file in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947148#M114969</link>
    <description>You can also use the command "strings" to find text strings in a binary file.&lt;BR /&gt;&lt;BR /&gt;This is useful when looking for error messages, or other messages, when you don't have source code.&lt;BR /&gt;&lt;BR /&gt;Again, this usually gets piped through grep...&lt;BR /&gt;&lt;BR /&gt;strings &lt;FILENAME&gt; | grep &lt;SEARCHSTRING&gt;&lt;BR /&gt;&lt;BR /&gt;By the way, none of these answers is specific to hp-ux, they'll work with any unix/linux system.&lt;BR /&gt;&lt;BR /&gt;Enjoy!&lt;/SEARCHSTRING&gt;&lt;/FILENAME&gt;</description>
    <pubDate>Thu, 10 Apr 2003 14:46:48 GMT</pubDate>
    <dc:creator>Carl_35</dc:creator>
    <dc:date>2003-04-10T14:46:48Z</dc:date>
    <item>
      <title>Finding a string in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947138#M114959</link>
      <description>Hello everybody!!&lt;BR /&gt;&lt;BR /&gt;How i can find a string in a file?&lt;BR /&gt;&lt;BR /&gt;Sorry, but i'm a "freshman" in HPUX-11</description>
      <pubDate>Wed, 09 Apr 2003 12:30:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947138#M114959</guid>
      <dc:creator>JUAN_17</dc:creator>
      <dc:date>2003-04-09T12:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Finding a string in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947139#M114960</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;# grep thestring filename&lt;BR /&gt;&lt;BR /&gt;For example, if you want to find the string "host" in the file '/etc/hosts' you would do:&lt;BR /&gt;&lt;BR /&gt;# grep hosts /etc/hosts&lt;BR /&gt;&lt;BR /&gt;See the man pages for 'grep'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 09 Apr 2003 12:42:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947139#M114960</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2003-04-09T12:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Finding a string in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947140#M114961</link>
      <description>You can use grep, or cat and pipe to awk.&lt;BR /&gt;&lt;BR /&gt;RGds...Geoff</description>
      <pubDate>Wed, 09 Apr 2003 12:42:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947140#M114961</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2003-04-09T12:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Finding a string in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947141#M114962</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;One way to find a string in a file is with the 'grep' command:&lt;BR /&gt;&lt;BR /&gt;grep somestring filename&lt;BR /&gt;&lt;BR /&gt;Do a 'man grep' and take a look at the docs.  There are lots of regular expressions you can use for finding strings.&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Apr 2003 12:43:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947141#M114962</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2003-04-09T12:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: Finding a string in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947142#M114963</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;two possibilities:&lt;BR /&gt;&lt;BR /&gt;grep -i 'string' *&lt;BR /&gt;gives you the filename and the line with the string.&lt;BR /&gt;&lt;BR /&gt;If you edit a file with vi:&lt;BR /&gt;/string 'enter'&lt;BR /&gt;get the curser to the string.&lt;BR /&gt;&lt;BR /&gt;More questions?&lt;BR /&gt;&lt;BR /&gt;Volkmar</description>
      <pubDate>Wed, 09 Apr 2003 12:45:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947142#M114963</guid>
      <dc:creator>V. Nyga</dc:creator>
      <dc:date>2003-04-09T12:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: Finding a string in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947143#M114964</link>
      <description>Depends...&lt;BR /&gt;&lt;BR /&gt;If you're at a prompt -&lt;BR /&gt;grep "string" /path/to/filename&lt;BR /&gt;&lt;BR /&gt;If in "vi" -&lt;BR /&gt;&lt;ESC&gt; /string &lt;ENTER&gt; will take you to the first occurence of the string, "n" takes you to the next.&lt;/ENTER&gt;&lt;/ESC&gt;</description>
      <pubDate>Wed, 09 Apr 2003 12:49:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947143#M114964</guid>
      <dc:creator>Jon Mattatall</dc:creator>
      <dc:date>2003-04-09T12:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Finding a string in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947144#M114965</link>
      <description>grep &lt;STING&gt; file&lt;/STING&gt;</description>
      <pubDate>Wed, 09 Apr 2003 12:54:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947144#M114965</guid>
      <dc:creator>Domenico_5</dc:creator>
      <dc:date>2003-04-09T12:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: Finding a string in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947145#M114966</link>
      <description>Gracias a todos!!&lt;BR /&gt;&lt;BR /&gt;thanks to all of you!!&lt;BR /&gt;&lt;BR /&gt;Every day, i learn more...</description>
      <pubDate>Wed, 09 Apr 2003 13:03:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947145#M114966</guid>
      <dc:creator>JUAN_17</dc:creator>
      <dc:date>2003-04-09T13:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Finding a string in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947146#M114967</link>
      <description>freshman huh? welcome to the free world.&lt;BR /&gt;&lt;BR /&gt;grep is the tool you need to study.&lt;BR /&gt;&lt;BR /&gt;grep -v something *&lt;BR /&gt;&lt;BR /&gt;will print all the lines in all the files in the present directory, EXCEPT the lines that contain "something" - cool right?&lt;BR /&gt;&lt;BR /&gt;grep -E "name &amp;amp;&amp;amp; lastname" filename&lt;BR /&gt;&lt;BR /&gt;will get name and lastname out of a file.&lt;BR /&gt;&lt;BR /&gt;grep -E "name || lastname" filename&lt;BR /&gt;&lt;BR /&gt;will get either name or lastname out of the file.&lt;BR /&gt;&lt;BR /&gt;enough from the peanut galary -&lt;BR /&gt;&lt;BR /&gt;hack away - peace&lt;BR /&gt;Donny</description>
      <pubDate>Wed, 09 Apr 2003 13:08:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947146#M114967</guid>
      <dc:creator>Donny Jekels</dc:creator>
      <dc:date>2003-04-09T13:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Finding a string in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947147#M114968</link>
      <description>Here's a fun one.&lt;BR /&gt;&lt;BR /&gt;Want to find a text string in a file, but do not know which file or where to look?&lt;BR /&gt;&lt;BR /&gt;cd to root - cd /&lt;BR /&gt;and type:&lt;BR /&gt;&lt;BR /&gt;find . -type f -exec grep -l '&lt;TEXT string=""&gt;' {} \;&lt;BR /&gt;&lt;BR /&gt;Has been invaluable for me at times.&lt;BR /&gt;&lt;BR /&gt;Note: Can be a resource hog and take a long time if you have a substantial filesystem.&lt;BR /&gt;&lt;BR /&gt;Enjoy HP-UX!&lt;BR /&gt;&lt;BR /&gt;Kel&lt;/TEXT&gt;</description>
      <pubDate>Wed, 09 Apr 2003 13:17:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947147#M114968</guid>
      <dc:creator>Kelli Ward</dc:creator>
      <dc:date>2003-04-09T13:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: Finding a string in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947148#M114969</link>
      <description>You can also use the command "strings" to find text strings in a binary file.&lt;BR /&gt;&lt;BR /&gt;This is useful when looking for error messages, or other messages, when you don't have source code.&lt;BR /&gt;&lt;BR /&gt;Again, this usually gets piped through grep...&lt;BR /&gt;&lt;BR /&gt;strings &lt;FILENAME&gt; | grep &lt;SEARCHSTRING&gt;&lt;BR /&gt;&lt;BR /&gt;By the way, none of these answers is specific to hp-ux, they'll work with any unix/linux system.&lt;BR /&gt;&lt;BR /&gt;Enjoy!&lt;/SEARCHSTRING&gt;&lt;/FILENAME&gt;</description>
      <pubDate>Thu, 10 Apr 2003 14:46:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-a-string-in-a-file/m-p/2947148#M114969</guid>
      <dc:creator>Carl_35</dc:creator>
      <dc:date>2003-04-10T14:46:48Z</dc:date>
    </item>
  </channel>
</rss>

