[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gawk] Is it possible to @include an awk file whose filename is stor
From: |
Peng Yu |
Subject: |
[bug-gawk] Is it possible to @include an awk file whose filename is stored in a variable? |
Date: |
Fri, 9 Nov 2018 22:46:50 -0600 |
I can not @include an awk file whose filename is stored in a variable.
Is it possible? Thanks.
$ cat f.awk
function f() {
print "Hello World!"
}
$ awk -e 'x = "f.awk"; @include x; BEGIN{ f() }' < /dev/null
awk: cmd. line:1: x = "f.awk"; @include x; BEGIN{ f() }
awk: cmd. line:1: ^ syntax error
--
Regards,
Peng
- [bug-gawk] Is it possible to @include an awk file whose filename is stored in a variable?,
Peng Yu <=