shell脚本修改jar包内文件


#输入要修改的jar文件
echo "Please Input jar Name:(jar/servcie.jar)"
read jarName
#输入要修改jar内部文件名称
echo "Please Input file Name:(config.properties)"
read fileName
jar tvf $jarName |grep $fileName
#查询到的文件,选择要修改的文件
echo "Query out as follows,Please select the copy you want:"
read oldFilePath
jar xvf $jarName $oldFilePath
sleep 1
#复制你需要修改的文件
echo "Please Input replace file path:(like:config/config.properties)"
read newFilePath
cp $newFilePath $oldFilePath
echo "Replace success!"
jar uvf $jarName $oldFilePath
sleep 1
java -jar $jarName &


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM