<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://gunkies.org/index.php?action=history&amp;feed=atom&amp;title=32v_1m_expr</id>
		<title>32v 1m expr - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://gunkies.org/index.php?action=history&amp;feed=atom&amp;title=32v_1m_expr"/>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=32v_1m_expr&amp;action=history"/>
		<updated>2026-05-01T22:19:13Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.1</generator>

	<entry>
		<id>https://gunkies.org/w/index.php?title=32v_1m_expr&amp;diff=6964&amp;oldid=prev</id>
		<title>Neozeed: New page: EXPR(1)             UNIX Programmer's Manual              EXPR(1)    == NAME ==      expr - evaluate arguments as an expression  == SYNOPSIS ==      expr arg ...  == DESCRIPTION ==      Th...</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=32v_1m_expr&amp;diff=6964&amp;oldid=prev"/>
				<updated>2009-10-26T14:05:10Z</updated>
		
		<summary type="html">&lt;p&gt;New page: EXPR(1)             UNIX Programmer&amp;#039;s Manual              EXPR(1)    == NAME ==      expr - evaluate arguments as an expression  == SYNOPSIS ==      expr arg ...  == DESCRIPTION ==      Th...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;EXPR(1)             UNIX Programmer's Manual              EXPR(1)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== NAME ==&lt;br /&gt;
     expr - evaluate arguments as an expression&lt;br /&gt;
&lt;br /&gt;
== SYNOPSIS ==&lt;br /&gt;
     expr arg ...&lt;br /&gt;
&lt;br /&gt;
== DESCRIPTION ==&lt;br /&gt;
     The arguments are taken as an expression.  After evaluation,&lt;br /&gt;
     the result is written on the standard output.  Each token of&lt;br /&gt;
     the expression is a separate argument.&lt;br /&gt;
&lt;br /&gt;
     The operators and keywords are listed below.  The list is in&lt;br /&gt;
     order of increasing precedence, with equal precedence opera-&lt;br /&gt;
     tors grouped.&lt;br /&gt;
&lt;br /&gt;
     _e_x_p_r | _e_x_p_r&lt;br /&gt;
          yields the first _e_x_p_r if it is neither null nor `0',&lt;br /&gt;
          otherwise yields the second _e_x_p_r.&lt;br /&gt;
&lt;br /&gt;
     _e_x_p_r &amp;amp; _e_x_p_r&lt;br /&gt;
          yields the first _e_x_p_r if neither _e_x_p_r is null or `0',&lt;br /&gt;
          otherwise yields `0'.&lt;br /&gt;
&lt;br /&gt;
     _e_x_p_r _r_e_l_o_p _e_x_p_r&lt;br /&gt;
          where _r_e_l_o_p _i_s _o_n_e _o_f &amp;lt; &amp;lt;= = != &amp;gt;= &amp;gt;, yields `1' if the&lt;br /&gt;
          indicated comparison is true, `0' if false.  The com-&lt;br /&gt;
          parison is numeric if both _e_x_p_r are integers, otherwise&lt;br /&gt;
          lexicographic.&lt;br /&gt;
&lt;br /&gt;
     _e_x_p_r + _e_x_p_r&lt;br /&gt;
          _e_x_p_r - _e_x_p_r&lt;br /&gt;
          addition or subtraction of the arguments.&lt;br /&gt;
&lt;br /&gt;
     _e_x_p_r * _e_x_p_r&lt;br /&gt;
          _e_x_p_r / _e_x_p_r&lt;br /&gt;
          _e_x_p_r % _e_x_p_r&lt;br /&gt;
          multiplication, division, or remainder of the argu-&lt;br /&gt;
          ments.&lt;br /&gt;
&lt;br /&gt;
     _e_x_p_r : _e_x_p_r&lt;br /&gt;
          The matching operator compares the string first argu-&lt;br /&gt;
          ment with the regular expression second argument; regu-&lt;br /&gt;
          lar expression syntax is the same as that of _e_d(1).&lt;br /&gt;
          The \(...\) pattern symbols can be used to select a&lt;br /&gt;
          portion of the first argument.  Otherwise, the matching&lt;br /&gt;
          operator yields the number of characters matched (`0'&lt;br /&gt;
          on failure).&lt;br /&gt;
&lt;br /&gt;
     ( _e_x_p_r )&lt;br /&gt;
          parentheses for grouping.&lt;br /&gt;
&lt;br /&gt;
     Examples:&lt;br /&gt;
&lt;br /&gt;
     To add 1 to the Shell variable _a:&lt;br /&gt;
&lt;br /&gt;
          a=`expr $a + 1`&lt;br /&gt;
&lt;br /&gt;
     To find the filename part (least significant part) of the&lt;br /&gt;
     pathname stored in variable _a, which may or may not contain&lt;br /&gt;
     `/':&lt;br /&gt;
&lt;br /&gt;
          expr $a : '.*/\(.*\)' '|' $a&lt;br /&gt;
&lt;br /&gt;
     Note the quoted Shell metacharacters.&lt;br /&gt;
&lt;br /&gt;
== SEE ALSO ==&lt;br /&gt;
     [[32v 1m ed|ed(1)]], [[32v 1m sh|sh(1)]], [[32v 1m test|test(1)]]&lt;br /&gt;
&lt;br /&gt;
== DIAGNOSTICS ==&lt;br /&gt;
     _E_x_p_r returns the following exit codes:&lt;br /&gt;
&lt;br /&gt;
          0    if the expression is neither null nor `0',&lt;br /&gt;
          1    if the expression is null or `0',&lt;br /&gt;
          2    for invalid expressions.&lt;br /&gt;
&lt;br /&gt;
[[Category:32v man section 1]]&lt;/div&gt;</summary>
		<author><name>Neozeed</name></author>	</entry>

	</feed>