From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9312 invoked from network); 21 Mar 2000 17:56:59 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 21 Mar 2000 17:56:59 -0000 Received: (qmail 2976 invoked by alias); 21 Mar 2000 17:56:41 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10192 Received: (qmail 2963 invoked from network); 21 Mar 2000 17:56:40 -0000 Message-Id: <200003211756.LAA23321@wo1203.cmg.FCNBD.COM> Content-Type: text/plain MIME-Version: 1.0 (NeXT Mail 4.2mach_patches v148.2) In-Reply-To: X-Nextstep-Mailer: Mail 4.2mach_patches (Enhance 2.0b5) From: Brian Boonstra Date: Tue, 21 Mar 2000 11:56:36 -0600 To: Zefram Subject: Re: For the MACHINES file: OpenStep/NeXTStep 4.2 and zsh-3.1.6-dev-19 cc: zsh-workers@sunsite.auc.dk References: Zefram wrote: > gsub. That's interesting. What's the correct syntax for a global > substitution in this awk? Well, this awk doesn't have a lot of keywords. The closest relevant thing from the manpage is: Files are read in order; if there are no files, the standard input is read. The file name `-' means the standard input. Each line is matched against the pattern portion of every pattern-action statement; the associated action is performed for each matched pattern. And here is what I have taken to be the complete list of functions: The print statement prints its arguments on the standard output (or on a file if >file is present), separated by the current output field separator, and terminated by the output record separator. The printf statement formats its expres- sion list according to the format (see printf(3S)). The built-in function length returns the length of its argu- ment taken as a string, or of the whole line if no argument. There are also built-in functions exp, log, sqrt, and int. The last truncates its argument to an integer. substr(s, m, n) returns the n-character substring of s that begins at position m. The function sprintf(fmt, expr, expr, ...) formats the expressions according to the printf(3S) format given by fmt and returns the resulting string. I assume it matches the spec in the reference below: SEE ALSO lex(1), sed(1) A. V. Aho, B. W. Kernighan, P. J. Weinberger, Awk - a pat- tern scanning and processing language Regards, Brian