Skip to main content

read the glob docs! And never forget the sacrafice that glob is making for you.

extglob changes the way certain characters are parsed. It is necessary to have a newline (not just a semicolon) between shopt -s extglob and any subsequent commands to use it.You cannot enable extended globs inside a group command that uses them, because the entire block is parsed before the shopt is evaluated. Note that the typical function body is a group command. An unpleasant workaround could be to use a subshell command list as the function body.
Therefore, if you use this option in a script, it is best put right under the shebang line.
Toggle line numbers
   1 #!/usr/bin/env bash
   2 shopt -s extglob   # and others, such as nullglob dotglob
   3 


Comments

Popular posts from this blog

Many organizations get vertical and horizontal confused. Their 'verticals' cross-cut the vertical stack and are really 'horizontals'.        scrum-teams-vs-traditionally-organized-teams
Answer to interview question - "What is the most important thing Object Oriented languages have contributed to software development?" ...sufficiently  model  the real world and problem at hand before jumping the gun. ...the success of graphical user interfaces like X and Windows. A GUI consists of several objects which have a behaviour on their own, something that OO is able to represent closely. ...polymorphism to match the logical way classification worked in real life -> code reuse ..limit project churn s tackexchange Tony Hoare introduced Null references in ALGOL W back in 1965 “simply because it was so easy to implement”, says Mr. Hoare. He talks about that decision considering it “my billion-dollar mistake”.  http://www.infoq.com/presentations/Null-References-The-Billion-Dollar-Mistake-Tony-Hoare

devops day 1

Kubernetes on a mac tutorial Assumes you have node and docker. Get them with homebrew works. https://kubernetes.io/docs/tutorials/stateless-application/hello-minikube/