title: Howto Pass A String as Parameter in AWK within Bash Script
body: <p>I have a text file which I want to filter
  using awk. The text file looks like this:</p>
  
  <pre><code>foo 1
  bar 2
  bar 0.3
  bar 100
  qux 1033
  </code></pre>
  
  <p>I want to filter those files with awk inside a bash script.</p>
  
  <pre><code>#!/bin/bash
  
  #input file
  input=myfile.txt
  
  # I need to pass this as parameter
  # cos later I want to make it more general like
  # coltype=$1
  col1type="foo"   
  
  #Filters
  awk '$2&gt;0 &amp;&amp; $1==$col1type' $input
  </code></pre>
  
  <p>But somehow it failed. What's the right way to do it?</p>