awk

awkリテラルとして'(single quotation)を使う方法が不明!!!

とりあえずメモ。

http://www.kt.rim.or.jp/~kbk/gawk-3.1/gawk.html#SEC19
http://tomecat.com/jeffy/tttt/quoting.html

% awk -F: '{print thequote$1}' thequote="'" /etc/passwd
awk -F: {print foo$1} foo=' /etc/passwd

This avoids the whole quote nesting issue altogether. And proves once again that there's always more than one way to do it.