aboutsummaryrefslogtreecommitdiff
path: root/coreutils-5.3.0-bin/share/awk/noassign.awk
blob: 2ad1f378a0ea301af5420fe1e3345ac690b83ee8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# noassign.awk --- library file to avoid the need for a
# special option that disables command-line assignments
#
# Arnold Robbins, arnold@skeeve.com, Public Domain
# October 1999

function disable_assigns(argc, argv,    i)
{
    for (i = 1; i < argc; i++)
        if (argv[i] ~ /^[A-Za-z_][A-Za-z_0-9]*=.*/)
            argv[i] = ("./" argv[i])
}

BEGIN {
    if (No_command_assign)
        disable_assigns(ARGC, ARGV)
}