This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 109021 - reset GREP_OPTIONS in bash startup script
Summary: reset GREP_OPTIONS in bash startup script
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All Linux
: P3 blocker (vote)
Assignee: issues@platform
URL:
Keywords:
: 196430 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-07-06 14:33 UTC by javajoe
Modified: 2014-12-03 09:25 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description javajoe 2007-07-06 14:33:06 UTC
This is quite unusual, but if a linux user has the GREP_OPTIONS set in their shell (to help highlite grep searches), it
will mess up the memory allocation routine in heap_size() (netbeans bash startup script)

The fix:
add the following to the Linux case:

export GREP_OPTIONS=

You may want to place it earlier in the script, but this worked for me. This allows the next line which tries to read
the meminfo to work, rather then get a blank value for $mem

snip-it below
...
heap_size () {
    mem=128
    case "`uname`" in
        Linux*)
--->>   export GREP_OPTIONS=
        mem=`cat /proc/meminfo | grep MemTotal | tr -d [:space:][:alpha:]:`
        mem=`expr $mem / 4096`
        ;;
    SunOS*)
        mem=`/usr/sbin/prtconf | grep Memory | /usr/xpg4/bin/tr -dc '[:digit:]'`
        mem=`expr $mem / 4`
        ;;
# Disable the heuristics on Mac until we resolve #106965
...
Comment 1 Petr Chytil 2008-09-17 11:45:19 UTC
reassigning to core/code
Comment 2 Twister 2014-04-24 09:27:53 UTC
*** Bug 196430 has been marked as a duplicate of this bug. ***