# NLS nuisances. for as_var in/lang language lc_address lc_all lc_collate lc_ctype lc_identification/lc_measurement lc_messages extends lc_name lc_numeric lc_paper/contains rows if (set + X; test-z "'(eval $ as_var = C; export $ as_var) 2> & 1' "); then eval $ as_var = C; export $ as_var else $ as_unset $ as_var fidone this code is actually very simple, it is nothing more than setting all the names listed after in to global variables, and setting the values of these variables to C. Learn the syntax first.
1The general format of the f o r loop is: for variable name I n List D O command 1 command 2 mongod o n e when the variable value is in the list, f o r executes all commands once in a loop and uses the variable name to access the values in the list. The command can be any valid s h e l commands and statements. The variable name is any word. I n list usage is optional. If you do not need it, f o r uses the location parameter of the command line cyclically (excluding the script name ). The I n list can contain replacement, string, and file name.
2 evalThe e v a l command first scans the command line for all replications, and then runs the command. This command is applicable to variables that cannot implement its functions at one scan. This command scans variables twice. These variables that require two scans are sometimes called complex variables. The e v a l command is not a common command in the script, but if you need to scan the variable twice, you need to use the e v a l command. I wrote a program to display these variable values, and also experienced the advantages of Eval: for as_var in/lang language lc_address lc_all export lc_ctype lc_identification/lc_measurement lc_messages extends lc_name lc_numeric lc_paper/lc_telephone lc_timedo eval echo "$ as_var =/$ as_var" done output: lang = clanguage = c ....