Home > OS >  How simple use command substitution below, do not need the vi in modified
How simple use command substitution below, do not need the vi in modified

Time:09-28

How simple use command substitution below, do not need the vi in modified:

The old configuration
Catalina. Sh

JAVA_OPTS="$JAVA_OPTS - d64 - server - Xmn3072m - Xms12288m Xmx12288m - XX: XX: MetaspaceSize=256 m - MaxMetaspaceSize=1024 m - XX: NewSize=3072 m"

The new configuration

JAVA_OPTS="$JAVA_OPTS - d64 - server - Xmn3072m - Xms16384m Xmx16384m - XX: XX: MetaspaceSize=256 m - MaxMetaspaceSize=1024 m"

Thank you for

CodePudding user response:

Try the awk command

CodePudding user response:

Sed -i 's/the original content/new content/g' catalina. With/in sh if alternative content, can also be replaced with s # # # #, etc. - is to modify the original file, I can't print only without modification; G is a full replacement

CodePudding user response:

So little change, using vi is simple enough, but make sure don't make a mistake,
Really want to change
# sed -i 's/- Xms12288m - Xmx12288m/Xms16384m - Xmx16384m/' catalina. Sh
# sed -i 's/- XX: NewSize=3072 m//' catalina. Sh
Next:Ubuntu
  • Related