title: List all the users who currently logged in to the unix server
body: <p>In unix, I use the <code>who</code>-command to list out all the users who currently logged in to the system.<br>
  I wish to write a <code>bash</code> shell script which displays the same outputs as the <code>who</code>-command.<br>
  I have tried the following:   </p>
  
  <ol>
  <li><code>vi log.sh</code> -now there is a file <code>log.sh</code>  </li>
  <li>now, typed <code>who</code></li>
  <li>save and quit   </li>
  <li>give execute permission: <code>chmod +x log.sh</code>  </li>
  <li>execute: <code>sh -vx log.sh</code>  </li>
  </ol>
  
  <p>This will give the same output as using <code>who</code>.<br>
  However, is there another way to write such a shell script?</p>