title: SED change value in file
body: <p>Again question about SED. So I have log file:</p>
  
  <pre><code>#######################################
  ################start host1############
  #######################################
  ##java serv
  host1,def,java,es,dev L2,0,dev w,fr
  host1,def,java,es,dev L3,0,dev w,fr
  host1,def,java,es,dev M1,0,dev w,fr
  host1,def,java,es,dev M4,0,dev w,fr
  host1,def,java,es,dev N1,0,dev w,fr
  host1,def,java,es,dev M5,0,dev w,fr
  
  
  ##c++ serv
  host1,def,ESServer,es,dev L2,0,dev w,fr
  host1,def,ESServer,es,dev L3,0,dev w,fr
  host1,def,ESServer,es,dev M1,0,dev w,fr
  host1,def,ESServer,es,dev M4,0,dev w,fr
  host1,def,ESServer,es,dev N1,0,dev w,fr
  host1,def,ESServer,es,dev M5,0,dev w,fr
  #######################################
  ################end host1##############
  #######################################
  
  #######################################
  ################start host2############
  #######################################
  ##java serv
  host2,def,java,es,dev L2,0,dev w,fr
  host2,def,java,es,dev L3,0,dev w,fr
  host2,def,java,es,dev M1,0,dev w,fr
  host2,def,java,es,dev M4,0,dev w,fr
  host2,def,java,es,dev N1,0,dev w,fr
  host2,def,java,es,dev M5,0,dev w,fr
  
  
  ##c++ serv
  host2,def,ESServer,es,dev L2,0,dev w,fr
  host2,def,ESServer,es,dev L3,0,dev w,fr
  host2,def,ESServer,es,dev M1,0,dev w,fr
  host2,def,ESServer,es,dev M4,0,dev w,fr
  host2,def,ESServer,es,dev N1,0,dev w,fr
  host2,def,ESServer,es,dev M5,0,dev w,fr
  #######################################
  ################end host2##############
  #######################################
  </code></pre>
  
  <p>How can I change value from 0 to 1 after L2 symbol in section "host1", tags "java" and "c++"? This variant doesn't work for me:</p>
  
  <pre><code>  sed  '/start host1/,/end host1/s/,L2,0,/L2,1,/g' file
  </code></pre>
  
  <p>And another question. How to change this value only in java tag and only in c++ tag in "host1" section. 
  Thanks in advance!</p>