I have a shell script that has following entry.
MEM_ARGS="-Xms256m -Xmx512m"
export MEM_ARGS
if [ "${JAVA_VENDOR}" = "Sun" ] ; then
if [ "${PRODUCTION_MODE}" = "" ] ; then
MEM_DEV_ARGS="-XX:CompileThreshold=8000 -XX:PermSize=48m "
export MEM_DEV_ARGS
fi
fi
# Had to have a separate test here BECAUSE of immediate variable expansion on windows
if [ "${JAVA_VENDOR}" = "Sun" ] ; then
MEM_ARGS="${MEM_ARGS} ${MEM_DEV_ARGS} -XX:MaxPermSize=512m"
export MEM_ARGS
fi
if [ "${JAVA_VENDOR}" = "HP" ] ; then
MEM_ARGS="${MEM_ARGS} -XX:MaxPermSize=128m"
export MEM_ARGS
fi
I want to change the line MEM_ARGS="-Xms256m -Xmx512m" to new value lets say MEM_ARGS="-Xms512m -Xmx1024m" . The intention is tha twhetever the value to be given it should go and set Xms and Xmx values.The problem here is that I can't find for word MEM_ARGS= and replace then becuase MEM_ARGS= is existing multiple places. So probably I need to search for "MEM_ARGS="-Xms" in this file and then replace the value that I want. Can you please suggest the best possible commands?
Thanks in advance,
Rijesh.