[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shopt suggestion
From: |
Martijn Dekker |
Subject: |
Re: shopt suggestion |
Date: |
Thu, 31 Aug 2017 19:03:30 +0200 |
User-agent: |
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.
- shopt suggestion, Nellis, Kenneth, 2017/08/31
- Re: shopt suggestion,
Martijn Dekker <=