gawk: fatal: `\p\P\o\p\S\i\z\e\' is not a legal variable nameThis may occur with gawk --version GNU Awk 3.1.5 but the circumstances are obscure. In once example, the command line worked on one system but failed on another with a similar but not identical version of the Linux operating system and T-shell.
uname -a Linux 2.6.18-308.13.1.el5 #1 SMP Tue Aug 21 17:10:18 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
uname -a Linux 2.6.18-308.24.1.el5 #1 SMP Tue Dec 4 17:43:34 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
When ??? was removed and the file name was used gawk worked as expected. (The shell environment variables were not changed.)
I.e. replaced $POPDIR/pop.??? with $POPDIR/pop.000
Where the wild cards may match multiple files, (as in this case) the file matching can be done by the shell before invoking gawk. E.g.
cat $POPDIR/pop.??? >! /tmp/allpops_$CPU time \ gawk -f mutation.awk -f mutation_define.awk -v "seed=1$3" \ -v "pPopSize=$mutants" -v "nCross=$mutants"\ -v "logfile=$POPDIR/pop.$1_parents" \ lines_used.dat /tmp/allpops_$CPU $POPDIR/pop.$1_select \ >! $POPDIR/pop.$2 if($status) exit $status;