<?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: fgrep: not enough memory in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/fgrep-not-enough-memory/m-p/3183225#M163280</link>
    <description>Here is the script.  OS is HP-UX 11.11&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;&lt;BR /&gt;find / -fsonly hfs -fsonly vxfs -type f -exec fgrep -l "128.166." {} \;&amp;gt;$1.ip&lt;BR /&gt;&lt;BR /&gt;strings=`cat ./exclude.strings`&lt;BR /&gt;&lt;BR /&gt;cat $1.ip|egrep -i -v "$strings"&amp;gt;$1.ip.1&lt;BR /&gt;&lt;BR /&gt;----------------------------------------&lt;BR /&gt;&lt;BR /&gt;maxdsiz       131072 - 0-503866 Pages  -&lt;BR /&gt;maxdsiz_64bit 262144 - 1024-1073479679 Pages &lt;BR /&gt;maxssiz        16384 - 0-98048  Pages   -&lt;BR /&gt;maxssiz_64bit   2048 - 4-262144 Pages   -&lt;BR /&gt;maxtsiz        65536 - 0-503859 Pages   -&lt;BR /&gt;maxtsiz_64bit 262144 - 1024-1073741823 Pages&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 05 Feb 2004 10:00:04 GMT</pubDate>
    <dc:creator>jerry1</dc:creator>
    <dc:date>2004-02-05T10:00:04Z</dc:date>
    <item>
      <title>fgrep: not enough memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fgrep-not-enough-memory/m-p/3183221#M163276</link>
      <description>I know what your thinking.&lt;BR /&gt;&lt;BR /&gt;This system is: Model:9000/800/S16K-A&lt;BR /&gt;                24448 megabytes&lt;BR /&gt;&lt;BR /&gt;I am doing a global find with fgrep.&lt;BR /&gt;Excluding NFS mounts of course.&lt;BR /&gt;&lt;BR /&gt;Why is fgrep barking. Is it some kind of buffer&lt;BR /&gt;limitation, kernel parm, etc...??&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Feb 2004 15:28:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fgrep-not-enough-memory/m-p/3183221#M163276</guid>
      <dc:creator>jerry1</dc:creator>
      <dc:date>2004-02-04T15:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: fgrep: not enough memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fgrep-not-enough-memory/m-p/3183222#M163277</link>
      <description>Hi Jerry,&lt;BR /&gt;&lt;BR /&gt;Several things:&lt;BR /&gt;&lt;BR /&gt;1)Does grep -F ......  do the same thing? fgrep is obsolete now.&lt;BR /&gt;2) swap reservation exceeded?&lt;BR /&gt;swapinfo -tam&lt;BR /&gt;3) max?siz kernel parm maxxed out?&lt;BR /&gt;4) ulimit?&lt;BR /&gt;&lt;BR /&gt;If you're grepping the entire system via find, then I'd suspect #3 or #4 is your problem.&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jeff</description>
      <pubDate>Wed, 04 Feb 2004 15:35:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fgrep-not-enough-memory/m-p/3183222#M163277</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2004-02-04T15:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: fgrep: not enough memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fgrep-not-enough-memory/m-p/3183223#M163278</link>
      <description>I suspect that you are grepping on a non-text file so that unexpected behavior is encounter. You probably should put a 'file' command in and text to see if this is an ASCII file before grepping.&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Feb 2004 15:37:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fgrep-not-enough-memory/m-p/3183223#M163278</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-02-04T15:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: fgrep: not enough memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fgrep-not-enough-memory/m-p/3183224#M163279</link>
      <description>Have you tried the fgrep command on a single file, to see if your problem is with fgrep or the specific file?&lt;BR /&gt;&lt;BR /&gt;The '-type f' in the commandline for the find command might help if the fgrep line works on normal files.&lt;BR /&gt;&lt;BR /&gt;If not, you might make a script that calls fgrep after logging the file it runs on to see what file is causing fgrep to fail...</description>
      <pubDate>Thu, 05 Feb 2004 01:24:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fgrep-not-enough-memory/m-p/3183224#M163279</guid>
      <dc:creator>Elmar P. Kolkman</dc:creator>
      <dc:date>2004-02-05T01:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: fgrep: not enough memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fgrep-not-enough-memory/m-p/3183225#M163280</link>
      <description>Here is the script.  OS is HP-UX 11.11&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;&lt;BR /&gt;find / -fsonly hfs -fsonly vxfs -type f -exec fgrep -l "128.166." {} \;&amp;gt;$1.ip&lt;BR /&gt;&lt;BR /&gt;strings=`cat ./exclude.strings`&lt;BR /&gt;&lt;BR /&gt;cat $1.ip|egrep -i -v "$strings"&amp;gt;$1.ip.1&lt;BR /&gt;&lt;BR /&gt;----------------------------------------&lt;BR /&gt;&lt;BR /&gt;maxdsiz       131072 - 0-503866 Pages  -&lt;BR /&gt;maxdsiz_64bit 262144 - 1024-1073479679 Pages &lt;BR /&gt;maxssiz        16384 - 0-98048  Pages   -&lt;BR /&gt;maxssiz_64bit   2048 - 4-262144 Pages   -&lt;BR /&gt;maxtsiz        65536 - 0-503859 Pages   -&lt;BR /&gt;maxtsiz_64bit 262144 - 1024-1073741823 Pages&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Feb 2004 10:00:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fgrep-not-enough-memory/m-p/3183225#M163280</guid>
      <dc:creator>jerry1</dc:creator>
      <dc:date>2004-02-05T10:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: fgrep: not enough memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fgrep-not-enough-memory/m-p/3183226#M163281</link>
      <description>As I tried to explain yesterday, you need to check to see if you are grepping a text file. Grepping a binary file (e.g. an executable) will yield absolutely chaotic results -- including program crashes. A -f find test is a necessary but not sufficient test. It determines that the file is a regular file but it does not determine that the file is a text file -- the file command does that.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You need to do something like this:&lt;BR /&gt;&lt;BR /&gt;find / -fsonly hfs -fsonly vxfs -type f -exec ftest.sh {} \;&amp;gt;$1.ip&lt;BR /&gt;&lt;BR /&gt;Now ftest.sh looks like this:&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;FNAME=${1}&lt;BR /&gt;file ${FNAME} | grep -q "text"&lt;BR /&gt;STAT=${?}&lt;BR /&gt;if [[ ${STAT} -eq 0 ]]&lt;BR /&gt;  then&lt;BR /&gt;    fgrep -l "128.166." ${FNAME}&lt;BR /&gt;  fi&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;This code could be made more efficient via xargs but that is left as an exercise for the reader.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Feb 2004 10:22:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fgrep-not-enough-memory/m-p/3183226#M163281</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-02-05T10:22:24Z</dc:date>
    </item>
  </channel>
</rss>

