How do strongly typed regexp constants work in GNU Awk?
问题 Strongly typed regexp constants is a handy tool that GNU Awk has. It is documented in GNU Awk User's Guide -> 6.1.2.2 Strongly Typed Regexp Constants and in there you can find interesting examples. From reading it, and comments to an answer I made up some examples that show those: $ cat file he;llo ho are you; $ gawk -v patt='@/;/' '$0 ~ patt' file # it prints those lines containing ";" he;llo you; In this case, we pass the pattern ";" with @/;/ and so it prints all the lines that contain ";"