cmp (1) --- string comparison 01/16/83 _U_s_a_g_e cmp _D_e_s_c_r_i_p_t_i_o_n 'Cmp' is a string comparison utility that is designed for use in function calls within arithmetic expressions. It compares the two strings given as arguments, and returns 1 if the specified relation holds, 0 otherwise. The following relations are supported (operators are the same as those in Ratfor, with some synonyms): == equal to = equal to < less than > greater than <= less than or equal to =< less than or equal to >= greater than or equal to => greater than or equal to ~= not equal to <> not equal to >< not equal to Notice that if the "greater than" symbol (">") is used in the argument, the argument must be quoted to prevent the shell from interpreting it as an I/O redirector. _E_x_a_m_p_l_e_s if [cmp [day] = friday]; echo T.G.I.F.; fi cmp [response] ~= "yes" cmp [term] ">=" [term_list[i]] _M_e_s_s_a_g_e_s "Usage: cmp ..." for invalid arguments. _B_u_g_s Redirection problem mentioned above. _S_e_e _A_l_s_o case (1), eval (1), if (1), equal (2), strcmp (2) cmp (1) - 1 - cmp (1)