The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Change directory in a shell script laxmi Linux 12 01-17-2008 08:07 AM
change directory using shell script laxmi Shell Programming and Scripting 0 01-17-2008 07:12 AM
Change Password In A Shell Script pintu_asim Shell Programming and Scripting 6 06-29-2006 11:16 AM
change user through shell script raviraushanjha UNIX for Dummies Questions & Answers 0 12-12-2005 03:11 AM
script to change shell and prompt SHYAM Shell Programming and Scripting 1 06-27-2004 09:46 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 05-19-2009
rijeshpp rijeshpp is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 8
Shell script to change a value

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.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:10 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0