title: How to get unique `uid`?
body: <p>I'm making a bash script which should create an ftp user.</p>
  
  <pre><code>ftpasswd --passwd --file=/usr/local/etc/ftpd/passwd --name=$USER --uid=[xxx]
       --home=/media/part1/ftp/users/$USER --shell=/bin/false
  </code></pre>
  
  <p>The only supplied argument to script is user name. But <code>ftpasswd</code> also requires <code>uid</code>. How do I get this number? Is there an easy way to scan <code>passwd</code> file and get the max number, increment it and use it? Maybe it's possible to obtain that number from the system?</p>