title: Trying to print awk variable
body: <p>I am not much of an awk user, but after some Googling, determined it would work best for what I am trying to do...only problem is, I can't get it to work.  I'm trying to print out the contents of sudoers while inserting the server name ($i) and a comma before the sudoers entry as I'm directing it to a .csv file.</p>
  
  <pre><code>egrep '^[aA-zZ]|^[%]' //$i/etc/sudoers | awk -v var="$i" '{print "$var," $0}' | tee -a $LOG
  </code></pre>
  
  <p>This is the output that I get:</p>
  
  <pre><code>$var,unixpvfn   ALL = (root)NOPASSWD:/usr/bin/passwd
  
  awk: no program given
  </code></pre>
  
  <p>Thanks in advance</p>