title: awk substitute shell variables
body: <p>I am struggling with awk substitution, for some reason the following code does not substitute anything, it just prints the output unaltered. Can anyone see what I am missing here? Any help would be very much appreachiated! (PS! The $DOCPATH and $SITEPATH are shell variables, they work perfectly fine in my awk setup).</p>
  
  <pre><code>awk -v docpath="$DOCPATH" -v sitepath="$SITEPATH" '{ sub( /docpath/, sitepath ) } { print }'
  </code></pre>