title: include library of functions in awk
body: <p>There are many common functions (especially arithmetic/mathematics) that are not built into <code>awk</code> that I need to write myself all the time.</p>
  
  <p>For example:</p>
  
  <ol>
  <li>There is no <code>c=min(a,b)</code>  , so in <code>awk</code> i constantly write <code>c=a&lt;b?a:b</code></li>
  <li>same for maximum  i.e. <code>c=max(a,b)</code></li>
  <li>same for absolute value  i.e.  <code>c=abs(a)</code>  so i have to constantly write <code>c=a&gt;0?a:-a</code></li>
  <li>and so on....</li>
  </ol>
  
  <p>Ideally, I could write these functions into an <code>awk</code> source file, and "include" it into all of my instances of awk, so I can call them at will.</p>
  
  <p>I looked into the "@include"  functionality of GNU's <code>gawk</code> , but it just executes whatever is in the included script - i.e. I cannot call functions.</p>
  
  <p>I was hoping to write some functions in e.g.  <code>mylib.awk</code>, and then "include" this whenever I call <code>awk</code>.</p>
  
  <p>I tried the <code>-f mylib.awk</code>  option to <code>awk</code>, but the script is executed - the functions therein are not callable.</p>