title: Predict UID for new user within a specific range from /etc/passwd
body: <p>I have to create users with UID in a range from 8000 to 9000 in /etc/passwd. Is there a way to predict the next UID to use with a commmand line.</p>
  
  <p>I know the command below gives me the UID to use after the last UID present in the passwd file :</p>
  
  <pre><code>awk -F: 'BEGIN {maxuid=0;} {if ($3 &gt; maxuid) maxuid=$3;} END {print maxuid+1;}' /etc/passwd
  </code></pre>
  
  <p>What do I have to change in the command line in order to get the next UID to use within the range 8000 - 9000 ?</p>
  
  <p>Thanks in advance </p>