The reference provided by you isn't a shell reference, it's a PHP example.
In shell, one way would be to use a loop:
for i in FOO BAR BAZ; do
export $i=value
done
質問
I would like to set the same value to the locale environment variables: LC_CTYPE
, LC_ALL
, LANG
.
I want to be able to set it directly on the interactive bash shell, something like this:
$ export LC_CTYPE=$LANG=$LC_ALL=C
This answer Assign same value to multiple variables shows how to do it in a script, but not in the interactive shell.
解決 2
The reference provided by you isn't a shell reference, it's a PHP example.
In shell, one way would be to use a loop:
for i in FOO BAR BAZ; do
export $i=value
done
他のヒント
export {LC_CTYPE,LANG,LC_ALL}=C