在VIM中快速更改tomcat配置文件的端口
这两天测试的时候,一个机器上同时运行了3、4个Tomcat,只好修改 $CATALINA_HOME/conf/server.xml 里的端口。
在 VIM 中用以下替换命令
:%s/\([pP]ort\)="\(\d\{4\}\)"/\1="3\2"/gc
全局替换端口数字长度为4的,在前面加上3。
最后面的 gc 是全局替换并且确认,去掉c就不用每次确认替换了。
« links for 2006-08-27 | Main | Java中获得系统的换行符 »
这两天测试的时候,一个机器上同时运行了3、4个Tomcat,只好修改 $CATALINA_HOME/conf/server.xml 里的端口。
在 VIM 中用以下替换命令
:%s/\([pP]ort\)="\(\d\{4\}\)"/\1="3\2"/gc
全局替换端口数字长度为4的,在前面加上3。
最后面的 gc 是全局替换并且确认,去掉c就不用每次确认替换了。
Comments
Reagan took the lead while in the 1980 primaries when he angrily explained "I'm paying for this microphone". One other guys standing on stage looked like piker's at that moment. A bit very well put anger goes a long way. It could be pleasant to see Romney boot a reporter outside of a briefing the next time they request a loaded query (or inquire the reporter why they're asking him silly questions rather than asking the President about safety failures in Libya). Most intelligent Americans would quietly be imagining "right on!". Romney can win this issue if he exposes and handles the biased media. If he allows himself to acquire rolled, he is toast. He's bought to use their bias to demonstrate his Presidential qualities, not allow the media demonstrate him for being un-presidential.
Posted by: Dorian Barchus | October 28, 2012 10:49 PM