|
|
about gawk on Mac OS
Hi All
I want using gawk include file function . It it seem that not work on my Mac ?
Is just my Mac issue or not ?
base on below web site
http://www.gnu.org/s/gawk/manual/html_node/Include-Files.html
[~ ] gawk --version
GNU Awk 3.1.7
Copyright (C) 1989, 1991-2009 Free Software Foundation.
~/shell ] cat test2.awk
# test2.awk
@include "test1.awk"
BEGIN {
print "This is script test2."
}
[~/shell ] cat test1.awk
# test1.awk
BEGIN {
print "This is script test1."
}
[~/shell ] gawk -f test2.awk
gawk: test2.awk:2: @include "test1.awk"
gawk: test2.awk:2: ^ invalid char '@' in expression
[~/shell ] echo $AWKPATH
..:/Users/cxleung/shell
[~/shell ]
|
|
0
|
|
|
|
Reply
|
moonhkt (146)
|
10/15/2011 5:14:20 AM |
|
On 15/10/2011 07:14, moonhkt wrote:
> Hi All
>
> I want using gawk include file function . It it seem that not work on my Mac ?
>
> Is just my Mac issue or not ?
>
> base on below web site
> http://www.gnu.org/s/gawk/manual/html_node/Include-Files.html
>
> [~ ] gawk --version
> GNU Awk 3.1.7
You would need gawk >= 4 for the "@include" feature to work.
Hermann
|
|
0
|
|
|
|
Reply
|
peifer1 (58)
|
10/15/2011 6:26:38 AM
|
|
On 15.10.2011 08:26, Hermann Peifer wrote:
> On 15/10/2011 07:14, moonhkt wrote:
>> Hi All
>>
>> I want using gawk include file function . It it seem that not work on my Mac ?
>>
>> Is just my Mac issue or not ?
>>
>> base on below web site
>> http://www.gnu.org/s/gawk/manual/html_node/Include-Files.html
>>
>> [~ ] gawk --version
>> GNU Awk 3.1.7
>
> You would need gawk >= 4 for the "@include" feature to work.
Or, alternatively, the xgawk release (based on gawk 3.1.x).
Janis
>
> Hermann
|
|
0
|
|
|
|
Reply
|
janis_papanagnou (1029)
|
10/15/2011 9:15:33 AM
|
|
Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
> On 15.10.2011 08:26, Hermann Peifer wrote:
>> On 15/10/2011 07:14, moonhkt wrote:
>>> Hi All
>>>
>>> I want using gawk include file function . It it seem that not work on my Mac ?
>>>
>>> Is just my Mac issue or not ?
>>>
>>> base on below web site
>>> http://www.gnu.org/s/gawk/manual/html_node/Include-Files.html
>>>
>>> [~ ] gawk --version
>>> GNU Awk 3.1.7
>>
>> You would need gawk >= 4 for the "@include" feature to work.
>
> Or, alternatively, the xgawk release (based on gawk 3.1.x).
Or in gawk distribution there is 'igawk' which does what you desire
using shell and gawk. Chances are that 'igawk' is already installed.
M.
|
|
0
|
|
|
|
Reply
|
michal (77)
|
10/15/2011 11:07:20 PM
|
|
|
3 Replies
226 Views
(page loaded in 0.06 seconds)
|
|
|
|
|
|
|
|
|