Subject: RE: Question(may be a Bug) to gsub () function of awk from GNU WI N32 Beta 19
From: [email-masked] (Bob McGowan)

25 Apr 1998 00:56:56 -0700
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain
To: [email-masked]

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: [email-masked]
[mailto:[email-masked]]
Sent: Friday, April 24, 1998 4:53 AM
To: [email-masked]
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
"[email-masked]" with one line of text: "help".
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".