AwkGuide
** Work in Progress ** {{{ import from Mark Hobley's wiki }}} <toc> ---- == Overview * [[Overview]] . . . [[empty string]] * [[END]] * [[enumeration]] * [[environment|ENVIRON]] * [[error handling]] * [[escape . . .
4K - last updated 2011-08-14 15:57 UTC by markhobley
case conversion
The [[awk]] extraction and reporting language provides the toupper and tolower functions for converting . . . function are affected by the following locale environment variable settings. * LC_ALL * LC_CTYPE . . .
2K - last updated 2011-06-25 05:10 UTC by pgas
comp.lang.awk FAQ
This material of this faq originates from the comp.lang.awk FAQ that you can find there: * http://www.faqs.org/faqs/computer-lang/awk/faq/ . . . this answer]] ---- == How can I access shell or environment variables in an awk script? === Shells . . . Edit this answer]] === Environment variables in general <include "EnvVarGeneral"> . . . Edit this answer]] === exporting environment variables back to the parent process <include . . .
8K - last updated 2009-03-04 12:42 UTC by pgas
comp.lang.awk FAQJapanese
This material of this faq originates from the comp.lang.awk FAQ that you can find there: * http://www.faqs.org/faqs/computer-lang/awk/faq/ . . . this answer]] ---- == How can I access shell or environment variables in an awk script? === Shells . . . Edit this answer]] === Environment variables in general <include "EnvVarGeneralJapanese"> . . . Edit this answer]] === exporting environment variables back to the parent process <include . . .
4K - last updated 2008-11-24 09:01 UTC by pgas
ENVIRON
Modern versions of new awk (gawk, mawk, Bell Labs awk, any POSIX awk) all provide an array named ENVIRON. . . . The array is indexed by environment variable name; the value is that variable's . . .
1K - last updated 2008-11-19 13:13 UTC by pgas
ENVIRONJapanese
Modern versions of new awk (gawk, mawk, Bell Labs awk, any POSIX awk) all provide an array named ENVIRON. . . . The array is indexed by environment variable name; the value is that variable's . . .
1K - last updated 2008-11-24 08:05 UTC by pgas
environment
The ENVIRON [[associative container]] contains the values of the current environment. This enables an . . . environment variable to be accessed by using the environment . . . However, this does not affect the environment passed on to [[subprocess]]es that may . . .
1K - last updated 2011-06-07 01:05 UTC by markhobley
EnvVarGeneral
**Answer 1:** On Unix, use "alternate quoting", e.g. {{{ awk -F: '$1 ~ /'"$USER"'/ {print $5}' /etc/passwd . . . scripts that it's easy to put things into the environment for a single command run: {{{ name=felix . . .
3K - last updated 2011-07-05 09:31 UTC by pgas
FIXES
[[FIXES]] revised: . . . \xhhh (hexadecimal)\\ ENVIRON array contains environment: if shell variable V=thing,\\ ENVIRON["V"] . . . access to the environment (ENVIRON).\\ added -V to print version . . .
6K - last updated 2014-01-15 23:17 UTC by g0ph3r
PassingAShellVariable
The common solution is to use the -v option to define an awk variable giving it the value of the shell . . . '$0 ~ pattern{print}' }}} If your variable is an environment variable then you can access it using the . . .
1K - last updated 2009-01-30 08:36 UTC by pgas
PassingVariables
<toc> === Shells <include "Shells"> [[http://awk.freeshell.org/?action=edit;id=Shells| Edit . . . this answer]] === Environment variables in general <include "EnvVarGeneral"> . . . Edit this answer]] === exporting environment variables back to the parent process <include . . .
1K - last updated 2008-11-19 07:47 UTC by pgas
PassingVariablesToTheParentProcess
How can I put values into the environment of the program that called my awk program? Short answer, you . . . any memory location, including the parent's environment space. But the details are [obviously] . . .
1K - last updated 2008-11-19 07:45 UTC by pgas
PassingVariablesToTheParentProcessJapanese
How can I put values into the environment of the program that called my awk program? Short answer, you . . . any memory location, including the parent's environment space. But the details are [obviously] . . .
1K - last updated 2008-11-24 08:05 UTC by pgas
ShellQuoting
Quoting can be such a headache for the novice, in shell programming, and especially in awk. Art Povelones . . . the shell will copy verbatim, not interpreting environment variable substitutions etc.) {{{ cat <<'@@' . . .
2K - last updated 2008-11-19 07:41 UTC by pgas
special variable
Some [[variable]] names have a special meaning to the awk interpreter. == List of special variables == . . . | An informative array that contains the environment strings | [[FILENAME]] | An informative . . .
2K - last updated 2011-06-25 05:46 UTC by pgas
15 pages found.