title: How to grep two IP addresses and increase the value of the last number?
body: <p>I'm pretty new to Linux and writing scripts etc. I have this task where I need to find an IP-address from a database and then grep a bunch of files with this IP and the next one to see, if they have any presence there. Currently I have to first write:</p>
  
  <pre><code>rwhois -Br 0.0.0.0
  </code></pre>
  
  <p>and then </p>
  
  <pre><code>grep -wl '0.0.0.0\|0.0.0.1' /path/to/some/files
  </code></pre>
  
  <p>And I have to manually change the last digit from the rwhois and from the grep. 
  I got as far as to write a simple function like this</p>
  
  <pre><code>function info () {
      rhowis -Br $1
      grep -w '$1\|$1'
  }
  </code></pre>
  
  <p>But of course I'd have to somehow increase the value of the latter input by 1. Any good advice? And a small explanation of what you changed is appreciated so I can learn from this. Thanks!</p>