{"id":84,"date":"2013-11-13T21:00:00","date_gmt":"2013-11-13T21:00:00","guid":{"rendered":"http:\/\/www.b.shuttle.de\/hayek\/Hayek\/Jochen\/wp\/blog-en\/2013\/11\/13\/migrated-a-korn-shell-script-using-extended-pattern-matching-to-bash\/"},"modified":"2013-11-13T21:00:00","modified_gmt":"2013-11-13T21:00:00","slug":"migrated-a-korn-shell-script-using-extended-pattern-matching-to-bash","status":"publish","type":"post","link":"https:\/\/wp.jochen.hayek.name\/blog-en\/2013\/11\/13\/migrated-a-korn-shell-script-using-extended-pattern-matching-to-bash\/","title":{"rendered":"migrated a Korn shell script using &#8220;Extended Pattern Matching&#8221; to bash"},"content":{"rendered":"<p>\t\t\t\t<a href=\"https:\/\/www.gnu.org\/software\/bash\/manual\/html_node\/Pattern-Matching.html\">https:\/\/www.gnu.org\/software\/bash\/manual\/html_node\/Pattern-Matching.html<\/a><\/p>\n<p>I had to &#8220;<span>shopt -s extglob<\/span>&#8221; for that.<\/p>\n<p>I inserted the <span>shopt<\/span> 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&#8217;t say so. I rather threw some weird error messages. I reduced the code around the causing line to its minimum, occasionally moved the <span>shopt<\/span> to outside the loop, and it worked. If it had only been that straigt \u2026\t\t\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/www.gnu.org\/software\/bash\/manual\/html_node\/Pattern-Matching.html I had to &#8220;shopt -s extglob&#8221; 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&#8217;t say so. I rather threw some weird error messages. I reduced the code around the causing [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false,"_share_on_mastodon":"0"},"categories":[666],"tags":[],"class_list":["post-84","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"share_on_mastodon":{"url":"","error":""},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paO0kP-1m","jetpack_likes_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/84","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/comments?post=84"}],"version-history":[{"count":0,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/84\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/media?parent=84"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/categories?post=84"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/tags?post=84"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}