Jump to content

String comparison: Difference between revisions

Added output for Unix Shell solution
(Added bash solution)
(Added output for Unix Shell solution)
Line 510:
compare 50 20
</lang>
 
{{out}}
<pre>
'foo' and 'foo' are lexically equal
'foo' and 'foo' are equal with case insensitivity
 
'foo' and 'bar' are not lexically equal
'foo' is lexically after 'bar'
 
'FOO' and 'foo' are not lexically equal
'FOO' is lexically before 'foo'
'FOO' and 'foo' are equal with case insensitivity
 
'24' and '123' are not lexically equal
'24' is lexically after '123'
24 is numerically less than 123
 
'50' and '20' are not lexically equal
'50' is lexically after '20'
50 is numerically greater than 20
</pre>
 
{{omit from|Brlcad}}
Cookies help us deliver our services. By using our services, you agree to our use of cookies.