Postings on living in an Emacs world. Posts will be mostly on using Emacs, related functions and tools.

Ads by Google

Saturday, October 3, 2009

Passing AWK variables to shell commands for evaluation

For some reason, I never seem to get how to use the shell from within GNU AWK to manipulate the AWK variable and return it. Spending a lot of time with the system and getline command, I still couldn't figure out how to pass a variable to a shell command, evaluate it and then return the value.