本站教程收集整理的这篇文章主要介绍了给setenv.sh增加-XX:+UseCompressedOops,本站教程本站觉得挺不错的,便宜香港vps现在分享给大家,也给大家做个参考。
下面是编程之家 code.cc 通过网络收集整理的代码片段。
编程之家小编现在分享给大家,也给大家做个参考。
#!/bin/bash #Program: # 在每个tomcat下的bin里创建setenv.sh #1.输入目录 read -p "请输入shequ的目录:" dir if [ ${dir} == "" -o ! -d ${dir} ]; then echo "$dir 不存在" exit 1 fi #为每个目录下创建sentenv.sh dirList=$(ls -d ${dir}/*/bin ) for binDir in $dirList do #没有就创建setenv.sh filename=${BinDir}/setenv.sh if [ ! -f filename ]; then touch ${filename} fi temp=$(cat ${filename}) count1=$(echo ${temp}|grep -c 'JAVA_OPTS') count2=$(echo ${temp}|grep -c 'UseCompressedOops') # echo ${filename}${Count1}${count2} if [ ${Count1} == '1' ] && [ ${count2} == '0' ]; then temp=$(echo ${temp}|sed 's/"$/ -XX:+UseCompressedOops"/g') elif [ ${Count1} == '0' ]; then temp='JAVA_OPTS="$JAVA_OPTS -XX:+UseCompressedOops"' fi echo ${temp}>${filename} done
本站总结
以上是本站教程为你收集整理的给setenv.sh增加-XX:+UseCompressedOops全部内容,希望文章能够帮你解决给setenv.sh增加-XX:+UseCompressedOops所遇到的程序开发问题。
如果觉得本站教程网站内容还不错,欢迎将本站教程推荐给好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。