home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sunic!dkuug!newsie!newsie!i3423
- From: bobby@dc.dk (Bobby Billingsley)
- Newsgroups: comp.unix.questions
- Subject: Re: nawk functions
- Message-ID: <i3423.724436782@newsie>
- Date: 15 Dec 92 16:26:22 GMT
- References: <1992Dec9.171505.4865@dkbfpny.com>
- Sender: news@newsie.dc.dk (USENET News System)
- Organization: Datacentralen A/S
- Lines: 34
- Originator: i3423@zarina.dc.dk
- Nntp-Posting-Host: zarina.dc.dk
-
- vlad@dkbfpny.com (Vladimir Stavitsky) writes:
-
- >Hi,
- >here is the problem: i'm trying to define some function with nawk,
- >but it is not recognised:
-
- >echo some string | \
- v--------------------Here's the culprit!!!
- >nawk 'function fff (x)
- > { print x }
-
- > { print $0; fff ($0) }
-
-
- >Below is what i'm getting from nawk:
-
- >nawk: funny variable 604320: n=fff s="" f=1 t=40
- > input record number 1
- > source line number 4
- >some string
-
- >Any help would be appreciated; especially by email.
- >Thanks very much
- >Vlad
-
- I haven't been able to find it in the docs I have, but just remove that
- space between the function name and the left parenthesis, and you'll
- be fine.
-
- --
- : Bobby Billingsley : Remember to love while you dare to :
- : Datacentralen, Denmark : remember to live while you do so :
- : Phone: +45 4371-8122 Ext. 3337 :........................-.Piet.Hein...:
- : E-mail: bobby@dc.dk : DoD# 80884 : Ride=Yamaha XJ600, 1986 :
-