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!

Search results for query: *

  1. cuttersw

    finding a value in an array

    I eventually figured out the missing comma from the split function, but what i didn't realize was "in" worked on the key rather than the value. Once i got past the missing comma I came up with this earlier and it worked too.. BEGIN {...
  2. cuttersw

    Stripping quotes from around fields.

    Ahhhhh - that's much better! - Thanks very much futurelet.
  3. cuttersw

    GUI / Debugger for AWK???

    Thanks for the response feherke. - I guess i'd better polish up on my AWK skills and start debugging manually with print. Shaun.
  4. cuttersw

    finding a value in an array

    What is the simplest way to determine if an element in an array contains a particular value? I have tried the following without success (Always returns "No!"): split("SMTP,smtp,X400,x400,X500,x500,MS,ms,RFAX,rfax,CCMAIL,ccmail",ValidTypes) variable = "X400" if (variable in ValidTypes) {...
  5. cuttersw

    Stripping quotes from around fields.

    ...I have managed to improve the above to this: mbname=$3 if (mbname ~ /^\"/) { split($3,xxx,"\"") mbname=xxx[2] } Is that as efficent as it gets or am i still missing a simpler solution?
  6. cuttersw

    Stripping quotes from around fields.

    Can anyone suggest a simple way to only return data that exists between quotes within a field. EG of data set: Mailbox}@{JohnD}@{John Doe}@{john.doe@domain.com%jd@domain.com%jd@dom2.com}@{y Mailbox}@{MaryS}@{“Smith, Mary”}@{smithm@domain.com}@{y Mailbox}@{BudH}@{Bud...
  7. cuttersw

    GUI / Debugger for AWK???

    Does anyone know if there is a graphical interface available for developing / debugging AWK programs? The sort of thing I am looking for will allow you to ‘single-step’ through AWK scripts, add ‘watches’ for variables, etc. Other features like syntax checking or even an included command...
  8. cuttersw

    Using a variable in an expression

    Could have swore i'd already tried that but obviously not as it works fine! - Thanks very much for the help PH.
  9. cuttersw

    Using a variable in an expression

    Nooby question: I am trying to use a variable in a 'match' expression but am having no luck. Can anyone advise how i should be doing this. This works: $4 ~ /@domain.com/ { print NR "\t" # $0 } But this does not: variable="@domain.com" $4 ~ /$variable/ { print NR "\t" # $0 } Shaun.

Part and Inventory Search

Back
Top