Error Message Interpretation Urgent!!! 
Author Message
 Error Message Interpretation Urgent!!!

Thanks to all those people who responded to my call for help.

Could anyone tell me why the following construct results in an
unmatched ' error_mesage.

nawk 'BEGIN {FS = "[      \(|   \(| \)|\) \(| \(|:]*"; OFS=" "}
            /\(INSTANCE/ { name[NR]=$3}
            /IOPATH/     {ckqmin[NR] = $5; ckqmax[NR] = $7};

             END{for(i=1; i<=NR; i++) print XXXXXXXX}' A > B

# What is wrong with the above construct?

I have noticed that for certain programing groups the error message comes up.



Sat, 13 Feb 1999 03:00:00 GMT  
 Error Message Interpretation Urgent!!!


Quote:
SUN IMP Slough) writes:

[deleted]
-Could anyone tell me why the following construct results in an
-unmatched ' error_mesage.
-
-nawk 'BEGIN {FS = "[      \(|   \(| \)|\) \(| \(|:]*"; OFS=" "}
-            /\(INSTANCE/ { name[NR]=$3}
-            /IOPATH/     {ckqmin[NR] = $5; ckqmax[NR] = $7};
-
-             END{for(i=1; i<=NR; i++) print XXXXXXXX}' A > B
[deleted]

If you are using the cshell, it may require some special incantation to accept
a multiline literal string (your awk script).


                     (215) 597-8377 Fax -2240 Custom House Rm 800
                     Philadelphia, PA 19106-297



Sat, 13 Feb 1999 03:00:00 GMT  
 Error Message Interpretation Urgent!!!


: Could anyone tell me why the following construct results in an
: unmatched ' error_mesage.

: nawk 'BEGIN {FS = "[      \(|   \(| \)|\) \(| \(|:]*"; OFS=" "}
:             /\(INSTANCE/ { name[NR]=$3}
:             /IOPATH/     {ckqmin[NR] = $5; ckqmax[NR] = $7};

:              END{for(i=1; i<=NR; i++) print XXXXXXXX}' A > B

: # What is wrong with the above construct?

I guess one problem is here the escape character "\" in your
assignment to FS.
When you want to represent the escape character in a string
expression, you have to write it as: "\\".

Try this:

nawk 'BEGIN {FS = "[      \\(|   \\(| \\)|\\) \\(| \\(|:]*"; OFS=" "}

Another problem is that in a character class (embraced with
"[...]") the "|" caracter is not evaluated as an or-operator
as you might expect. It represents here only the "|" character
and nothing else. So you should reconsider your whole
FS-Assignment.

---------------
Juergen Mueller



Sun, 14 Feb 1999 03:00:00 GMT  
 Error Message Interpretation Urgent!!!


Quote:
>Could anyone tell me why the following construct results in an
>unmatched ' error_mesage.
>nawk 'BEGIN {FS = "[      \(|   \(| \)|\) \(| \(|:]*"; OFS=" "}
>            /\(INSTANCE/ { name[NR]=$3}
>            /IOPATH/     {ckqmin[NR] = $5; ckqmax[NR] = $7};
>             END{for(i=1; i<=NR; i++) print XXXXXXXX}' A > B
># What is wrong with the above construct?

The last ' is not on the same line as the first.
Under unix you can escape the returns with \ als last character on the line
(also no spaces after it).

nawk 'BEGIN {FS = "[      \(|   \(| \)|\) \(| \(|:]*"; OFS=" "} \
            /\(INSTANCE/ { name[NR]=$3} \
            /IOPATH/     {ckqmin[NR] = $5; ckqmax[NR] = $7}; \
             END{for(i=1; i<=NR; i++) print XXXXXXXX}' A > B

should work.

I usually create a file tmp.awk for multi-line jobs. That is usually simpler.

Joachim.
--

Department of molecular biofysics, University of Utrecht
Utrecht, The Netherlands.
Homepage: http://www.fys.ruu.nl/~verhagen (Science Jokes & SF)



Sun, 14 Feb 1999 03:00:00 GMT  
 Error Message Interpretation Urgent!!!

Quote:
> The last ' is not on the same line as the first.
> Under unix you can escape the returns with \ als last character on the line
> (also no spaces after it).

'You are correct\
for embedding newlines\
in single-quoted strings\
of the csh'

'but newlines are embedded thusly
in single-quoted strings
of the sh and its off-spring'

This is one of the reasons that shell scripts are by and large written
for the bourne shell even when the csh is the preferred interactive shell.
When I use awk inside of a shell script, I seldomly use -f awk-scripts.
External awk-scripts also hinder the reference to shell variables.

Take a look at Spencer's and Collier-Brown's sh-scripts that come with
C-News to see the Tao of sh/awk/sed/...-interfacing.

                                                Martin Neitzel
--

Unix, Networking, Internet-Services / Xlink-POP           "Alles wird gut."



Mon, 15 Feb 1999 03:00:00 GMT  
 Error Message Interpretation Urgent!!!


Quote:

>Thanks to all those people who responded to my call for help.

>Could anyone tell me why the following construct results in an
>unmatched ' error_mesage.

>nawk 'BEGIN {FS = "[      \(|   \(| \)|\) \(| \(|:]*"; OFS=" "}
>            /\(INSTANCE/ { name[NR]=$3}
>            /IOPATH/     {ckqmin[NR] = $5; ckqmax[NR] = $7};

>             END{for(i=1; i<=NR; i++) print XXXXXXXX}' A > B

># What is wrong with the above construct?

>I have noticed that for certain programing groups the error message comes up.

Try this:

nawk 'BEGIN{FS=":"; OFS=" "}
       gsub("\\) \\(",":"); gsub("\\(",""); gsub("\\)",""); gsub(" ","")
       . . .
       . . .
       . . .
Hope that helps

Saludos. . .
Paulino



Wed, 17 Feb 1999 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. URGENT MESSAGE ERROr

2. Compiler message interpretation

3. URGENT URGENT URGENT

4. "Interesting" error interpretation

5. URGENT MESSAGE TO STONY BROOK PROLOG

6. Tcl-DP: urgent messages?

7. ERROR MESSAGE: Internal Error: tpsbt.cpp line 2172

8. Network error Message Error 50

9. Error message dbcommital internal error 19

10. Error message Ordlistadd (0) Internal error 1010

11. Error message Internal error 1010

12. spelling error in [scan] error message :)

 

 
Powered by phpBB® Forum Software