title: How to read user input into a variable in Bash?
body: <p>I'm trying to create a script that simplifies the process of creating a new user on an iOS device. Here are the steps broken down:</p>
  <pre class="lang-bash prettyprint-override"><code>fullname=&quot;USER INPUT&quot;
  user=&quot;USER INPUT&quot;
  group=$user
  uid=1000
  gid=1000
  home=/var/$user
  echo &quot;$group:*:$gid:$user&quot; &gt;&gt; /private/etc/group
  echo &quot;$user::$uid:$gid::0:0:$fullname:$home:/bin/sh&quot; &gt;&gt; /private/etc/master.passwd
  passwd $user
  mkdir $home
  chown $user:$group $home
  </code></pre>
  <p>As you can see, some fields require input. How can I request input for a variable in the script?</p>