Awk & bash: syntax error near unexpected token `(' : <p>When I paste this command into the terminal (ubuntu 18.04):</p>

<pre><code>cat file.txt | awk -F, BEGIN { OFS = FS } {if ($2 == "") $2 = last2; else last2 = $2 print}
</code></pre>

<p>I get:</p>

<pre><code>bash: syntax error near unexpected token `('
</code></pre>

<p>How to fix this?</p>
