Setting filename in BEGIN
Hello!
I try to process a hardcoded filename in my awk script, but is seems
to be harder to accomplish than i thougt first.
My minimal failing code example:
--
BEGIN {
ARGV[1]="filename"
}
{ print $0 }
--
Shouldn't awk read ARGV[1] after processing BEGIN to get the first
filename to work with?
Hope anybody can help me here.
Best regards,
Mario
--
Chaos reigns within.
Reflect, repent, and reboot.
Order shall return.
|