title: a simple sed script displaying only changed lines
body: <p>How could I make a separate sed script (let's call it script.sed) that would display only the changed lines without having to use the <code>-n</code> option while executing it? (Sorry for my English)</p>
  
  <p>I have a file called data2.txt with digits and I need to change the lines ending with ".5" and print those changed lines out in the console.</p>
  
  <p>I know how to do it with a single command (<code>sed -n 's/.5$//gp' data2.txt</code>),  however our university professor requires us to do the same using <code>sed -f script.sed data2.txt</code> command.</p>
  
  <p>Any ideas?</p>