TCC & Auk

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.


Staff member
May 16, 2008
Migrated From Jp Software Wiki

Awk is a pattern-action language. Perhaps the biggest hurdle to successfully using Awk with TCC is clashes in special characters. To avert excess head-scratching, put your awk scripts in a text file (typically with an extension of .awk), and use the -f {awk_script_filename} option of Awk.

One limitation of awk is that patterns are case-sensitive. To work around that, one can use functions built-in to Awk.

For example, suppose one wanted to print only lines containing the string "Whatever":

/Whatever/  {print $0}
To make the pattern case-INsensitive, one can use:

{if (match(tolower($0),"whatever")) print $0}
Also be aware that there are many variants of Awk available. Most have some unique features that will not work with other variants.