LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   awk question (mandrake 8.2) (https://www.linuxquestions.org/questions/linux-newbie-8/awk-question-mandrake-8-2-a-30736/)

Frauke 09-19-2002 04:05 PM

awk question (mandrake 8.2)
 
Hello!

I'v got a problem with an "if":

if (last_pitch ~ /[A-G]/) last_oc = length(last_pitch) * -1
else last_oc = length(last_pitch) - 1

last_pitch can be any characters from AA-GG, A-G, a-g, or aa-gg.
The "if" doesn't seem to be able to tell if the character(s) in last_pitch are upper-case or lower-case; that is, it always executes the first line, and never gets to the "else". A similar problem also occurs elsewhere in the program---it can't tell upper-case from lower-case. Is there a special way to indicate this?

Thanks!


All times are GMT -5. The time now is 04:16 AM.