wp.jochen.hayek.name/blog-en

migrated a Korn shell script using “Extended Pattern Matching” to bash

https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html

I had to “shopt -s extglob” for that.

I inserted the shopt line rather close to the case statement, where the Extended Pattern Matching gets employed. That was inside a loop. That had no effect, but it didn’t say so. I rather threw some weird error messages. I reduced the code around the causing line to its minimum, occasionally moved the shopt to outside the loop, and it worked. If it had only been that straigt …

Exit mobile version