title: Can someone explain why sed behaves that way when doing 'sed x file.txt'?
body: <p>I just found that if you do use sed in the following way it will output the file's contents. why would it do that or why does it behave that way?</p>
  
  <p>example:</p>
  
  <pre>╭─<b>hacker@HLKali</b> <b> ~/scripts</b>  
  ╰─<b>$</b> cat foxsocks.txt  
  red fox in red sox
  green frog in green frock
  pink mouse in pink trouse
  blue fly in blue tie
  ╭─<b>hacker@HLKali</b> <b> ~/scripts</b>  
  ╰─<b>$</b> sed x foxsocks.txt
  
  red fox in red sox
  green frog in green frock
  pink mouse in pink trouse
  ╭─<b>hacker@HLKali</b> <b> ~/scripts</b>  
  ╰─<b>$</b> 
  </pre>
  
  <p>so you can see that it does output the contents of the file except for the last line. This is a question just out of curiosity.</p>