Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.1.1
Op 31-08-17 om 16:43 schreef Nellis, Kenneth:
> At the keyboard, it is inconvenient to type (e.g.):
> shopt -s dotglob; mycmd; shopt -u dotglob
Try with a subshell. All it takes is a couple of parentheses.
(shopt -s dotglob; mycmd)
> But, I wonder if shopt might not itself accept a command to execute
> with one-time shopt options in effect.
The shopt command would have the same problem as your hypothetical
wrapper function: globbing is resolved before the command is even invoked.
- M.