sed -i 's/java-7-oracle/java-8-oracle/g' /etc/init.d/tomcat7
上面的命令是将tomcat7中的java-7-oracle替换为java-8-oracle (猜测s是substitute的缩写,g是global的缩写)