Created
August 6, 2015 23:02
-
-
Save douglasnaphas/e3f94805c8ffe9a5744f to your computer and use it in GitHub Desktop.
Why does awk print letters not between A and Z in the ASCII character set when told to print lines that match the regex [A-Z]?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ echo "b" | awk '/[A-Z]/' | |
b | |
$ echo "a" | awk '/[A-Z]/' | |
$ echo "z" | awk '/[A-Z]/' | |
z | |
$ |
Sorry, I can't get this to reproduce on my machine. My awk (the default ubuntu docker image) is case sensitive by default. When I force case sensitivity:
echo "a" | awk 'IGNORECASE = 1;/[A-Z/'
I get the correct output.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wait. I misread. Nevermind