I like the way a variable can be set for a single command, such as:
LANG=fr_FR.utf8 df -h
Is it possible to use the shopt -s
command, or some other method, to set a shell option, such as nullglob or extglob, for a single command in the same manner?
Depending on your use case, use a subshell: