set (1) --- assign values to shell variables 09/11/84 | _U_s_a_g_e set [ ] = [ ] _D_e_s_c_r_i_p_t_i_o_n 'Set' can be used to assign arbitrary values to shell variables. The first argument is the name of the variable to be set; if absent, the value is printed on standard out- put instead of being assigned. The third argument is the value to be assigned to the variable; if absent, one line is read from standard input, and the text thus entered becomes | the string to be assigned. The string may contain | unprintable characters in a mnemonic form. This consists of | a '<' sign followed by an ascii mnemonic and terminated by a | '>' symbol. To prevent a symbol from being interpreted, | simply escape the '<' with and '@' sign. For example to set | the variable lfcr to a linefeed and a carriage return, use: | set lfcr = "". If exists in the current scope or any surrounding scope, then its value is altered by 'set'; otherwise, it is created at the current lexical level and then the value is assigned. _E_x_a_m_p_l_e_s set i = 0 set i = [eval i + 1] | set lfcr = "" | set nolfcr = "@@" | set atsign = "@" set response = _S_e_e _A_l_s_o declare (1), forget (1), vars (1), save (1), _U_s_e_r_'_s _G_u_i_d_e _f_o_r _t_h_e _S_o_f_t_w_a_r_e _T_o_o_l_s _S_u_b_s_y_s_t_e_m _C_o_m_m_a_n_d _I_n_t_e_r_p_r_e_t_e_r set (1) - 1 - set (1)