title: awk: cmd. line:1: fatal: cannot open file `-eq' for reading (No such file or directory)
body: <p>Im quite new to bash scripting and I tried checking through the previous examples of this error but I still dont undertand why this isnt working</p>
  
  <p>Here is the snippit of code throwing up the error:</p>
  
  <pre><code>#!/bin/bash
  
  function group_check(){
      if [[getent group | awk -F":" '{print$1}' -eq $1 ]] ; then
              echo "The user exists!"
      else
              echo "The user doesn't exist!"
      fi
  }
  
  group_check tim
  group_check tam
  </code></pre>
  
  <p>Hopefully someone cant point out where im going wrong or perhaps even suggest a better way of doing this, but I would quite like to understand where im going wrong.</p>
  
  <p>Thanks</p>