Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Matching character "quota"

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello,

I want to match this character : '
I try to do this with :
gawk ' {

pos=match($0,a,"\'")
print pos
} ' DES

and i get :
gawk: cmd. line:3: pos=match($0,a,"\)
gawk: cmd. line:3: ^ unterminated string

How can I match the quota ?

Thanks for your reply.
 
Hi
Check out thread271-313385 in this forum
HTH ;-) Dickie Bird
db@dickiebird.freeserve.co.uk
 
you could try replacing the line

pos=match($0,a,"\'")
with
pos=match($0,"\'")

and it should work also
 
OK thank you

and sorry for my syntax fault; of course, it was :
pos=match($0,"\'") and not match($0,a,"\'") which is syntax of split, for example.

So, pos=match($0,"\047") work

Greetings, ctlm.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top