title: How to change a word of a particular line in a text?
body: <p>I am changing the last word of a particular line in a text.
  This word can be repeated in other lines.</p>
  
  <p>What command can I use for this?</p>
  
  <pre><code># file libros.bd 
  while IFS = read line
     do
       word=$(echo $line|rev|cut -f1 -d' '|rev) #Last word in each line
  done &lt;"$file"
  </code></pre>
  
  <p><strong>This is my input file:</strong></p>
  
  <blockquote>
    <p>18654 "JuanFrances" autor1 1964 1 no</p>
    
    <p>18655 "Lucas Tercero" autor2 1987 2 si</p>
    
    <p>18656 "Fernando Emperador" autor3 1845 5 no</p>
    
    <p>18657 "Juan Fernando" autor3 1965 1 si</p>
  </blockquote>
  
  <p><strong>This would be the final state</strong></p>
  
  <blockquote>
    <p>18654 "JuanFrances" autor1 1964 1 no</p>
    
    <p>18655 "Lucas Tercero" autor2 1987 2 si</p>
    
    <p>18656 "Fernando Emperador" autor3 1845 5 no</p>
    
    <p>18657 "Juan Fernando" autor3 1965 1 <strong>no</strong></p>
  </blockquote>
  
  <p><strong>This would be one way</strong></p>
  
  <blockquote>
    <p>sed ''"$line"'s/no/si/' libros.bd > temp &amp;&amp; mv temp libros.bd</p>
  </blockquote>