| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
| List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT sources DOT redhat DOT com |
| Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
| Message-ID: | <20010905041211.89275.qmail@web12601.mail.yahoo.com> |
| Date: | Wed, 5 Sep 2001 05:12:11 +0100 (BST) |
| From: | =?iso-8859-1?q?hrishy?= <hrishys AT yahoo DOT co DOT uk> |
| Subject: | Re: awk script compile problem |
| To: | Keith Seitz <keiths AT cygnus DOT com>, hrishy <hrishys AT yahoo DOT co DOT uk> |
| Cc: | cygwin AT cygwin DOT com |
| In-Reply-To: | <Pine.GSO.4.33.0109040747090.2403-100000@makita.cygnus.com> |
| MIME-Version: | 1.0 |
Hello Keith
I am glad that you responded.Thanks a lott buddy for
the help.
regards
Hrishy
--- Keith Seitz <keiths AT cygnus DOT com> wrote: > On Tue,
4 Sep 2001, [iso-8859-1] hrishy wrote:
>
> > a few minutes ago i installed cygwin and i tried
> to
> > run the following program.
>
> I doubt very much that this worked on anything. This
> awk program clearly
> has an obvious syntax error. On RH7.0:
>
> keiths ~ >awk -f a.awk
> awk: a.awk:10: if (( $2 ~ /Label/ ) && ( $3 ~
> /Not found/ )) {
> awk: a.awk:10: ^ parse error
> awk: a.awk:13: if (( $2 ~ /Form/ ) && ( $3 ~
> /Not found/ )) {
> awk: a.awk:13: ^ parse error
> awk: a.awk:16: if (( $2 ~ /Report/ ) && ( $3 ~
> /Not found/ )){
> awk: a.awk:16: ^ parse error
>
> I also get similar errors on Solaris using its
> standard awk:
>
> keiths ~ >/usr/bin/awk -f a.awk
> awk: syntax error near line 10
> awk: bailing out near line 10
>
> The structure of an awk program looks like ("..." =
> statements):
>
> [BEGIN] { ... }
> { ... }
> [END] { ... }
>
> Not like what you have:
>
> { ... }
> ...
> END { ... }
>
> Add braces ("{","}") at the appropriate places and
> it will work just fine.
>
> > #BEGIN
> > {
> > FS="|"
> > }
> Add "{" here.
>
> > if (( $2 ~ /Label/ ) && ( $3 ~ /Not found/
> )) {
> > label=label+1
> > }
> > if (( $2 ~ /Form/ ) && ( $3 ~ /Not found/ ))
> {
> > form=form+1
> > }
> > if (( $2 ~ /Report/ ) && ( $3 ~ /Not found/
> )){
> > report=report+1
> > }
> Add "}" here.
>
> > END { print FILENAME, "\t" label "\t"form "\t"
> report
> > >>"result.log"}
> >
> > this program runs correctly under mkstoolkit and
> on my
> > linux box.but fails to under cygwin.
> >
> > with a parse error ^ if (( $2 ~ /Report/ ) &&
> ( $3
> > ~ /Not found/ )){
>
> Keith
>
>
____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |