Question(may be a Bug) to gsub () function of awk from GNU WIN32 Beta 19
Bob McGowan
bob.mcgowan@artecon.com
Fri Apr 24 22:31:00 GMT 1998
Wolfgang,
I have seen discussion of a similar problem in the comp.lang.awk
newsgroup. Basically, the comments indicate that using the gsub() with
a quoted string as the first argument is the source of the problem.
gsub() expects a regular expression and so there is a string to regex
conversion, losing the escape char (\) and creating a regex of /|/ in
which (I assume) the pipe symbol has some special meaning.
So try replacing the "\|" with /\|/ (note no quotes).
I am afraid I do not have a setup to actually try this so I cannot
confirm that it really works.
---
Bob McGowan
i'm: bob dot mcgowan at artecon dot com
-----Original Message-----
From: Wolfgang_Hauser@Non-HP-Germany-notes1.om.hp.com
[ mailto:Wolfgang_Hauser@Non-HP-Germany-notes1.om.hp.com ]
Sent: Friday, April 24, 1998 4:53 AM
To: gnu-win32@cygnus.com
Subject: Question(may be a Bug) to gsub () function of awk from GNU
WIN32 Beta 19
I tryed to replace all "|" (Pipe sign) with " " (Blanks) by the
function call:
gsub("\|"," ",scr_line)
the result is, after every character of the variable src_line appears a
" "
Blank.
With an other awk (under POSIX) the function replaces the "|" properly
by
Blank and don't affect the other characters.
Does anybody know something about this ?
Wolfgang
-
For help on using this list (especially unsubscribing), send a message
to
"gnu-win32-request@cygnus.com" with one line of text: "help".
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
More information about the Cygwin
mailing list