title: Users who are logged on, in alphabetical order, printed on one line
body: <p>Users who are logged on, in alphabetical order, printed on one line.</p>
  <p>What are the minimum amount of changes to get this to work because in a bash script?</p>
  <p>this is the given script:</p>
  <pre><code>for name in $@
  do
      who | grep -w &quot;^name&quot; | sed 's/ .*//' | uniq
  done | sort | tr '\n' ' '
  echo
  </code></pre>