# ev(1) [osx man page]

```EV(1)							      General Commands Manual							     EV(1)

NAME
ev - evaluate expressions

SYNOPSIS
ev 'expr' ..

DESCRIPTION
Ev  evaluates  expressions  given  on the command line, and sends the results to the standard output, one per line.  An expression contains
real numbers, function calls, and the following operators:

+  -  *  /	^

Operators are evaluated left to right, except '^', which is right associative.  Powers have  the  highest  precedence;  multiplication  and
division  are  evaluated  before  addition  and subtraction.  Expressions can be grouped with parentheses.  All values are double precision
real.

The following library of functions is available:

if(cond, then, else)
if cond is greater than zero, then is evaluated, otherwise else is evaluated.

select(N, a1, a2, ..)
return aN (N is rounded to the nearest integer).  If N is zero, the number of available arguments is returned.

rand(x)	 compute a random number between 0 and 1 based on x.

floor(x)  return largest integer not greater than x.

ceil(x)	 return smallest integer not less than x.

sqrt(x)	 return square root of x.

exp(x)	 compute e to the power of x (e approx = 2.718281828).

log(x)	 compute the logarithm of x to the base e.

log10(x)  compute the logarithm of x to the base 10.

sin(x), cos(x), tan(x)
trigonometric functions.

asin(x), acos(x), atan(x)
inverse trigonometric functions.

atan2(y, x)
inverse tangent of y/x (range -pi to pi).

EXAMPLE
To pass the square root of two and the sine of .5 to a program:

program `ev 'sqrt(2)' 'sin(.5)'`

AUTHOR
Greg Ward

icalc(1), rcalc(1)

## Check Out this Related Man Page

```EV(1)							      General Commands Manual							     EV(1)

NAME
ev - evaluate expressions

SYNOPSIS
ev 'expr' ..

DESCRIPTION
Ev  evaluates  expressions  given  on the command line, and sends the results to the standard output, one per line.  An expression contains
real numbers, function calls, and the following operators:

+  -  *  /	^

Operators are evaluated left to right, except '^', which is right associative.  Powers have  the  highest  precedence;  multiplication  and
division  are  evaluated  before  addition  and subtraction.  Expressions can be grouped with parentheses.  All values are double precision
real.

The following library of functions is available:

if(cond, then, else)
if cond is greater than zero, then is evaluated, otherwise else is evaluated.

select(N, a1, a2, ..)
return aN (N is rounded to the nearest integer).  If N is zero, the number of available arguments is returned.

rand(x)	 compute a random number between 0 and 1 based on x.

floor(x)  return largest integer not greater than x.

ceil(x)	 return smallest integer not less than x.

sqrt(x)	 return square root of x.

exp(x)	 compute e to the power of x (e approx = 2.718281828).

log(x)	 compute the logarithm of x to the base e.

log10(x)  compute the logarithm of x to the base 10.

sin(x), cos(x), tan(x)
trigonometric functions.

asin(x), acos(x), atan(x)
inverse trigonometric functions.

atan2(y, x)
inverse tangent of y/x (range -pi to pi).

EXAMPLE
To pass the square root of two and the sine of .5 to a program:

program `ev 'sqrt(2)' 'sin(.5)'`

AUTHOR
Greg Ward

icalc(1), rcalc(1)

Man Page

## Bourne Shell: Special characters Input Prevention

Environment: Sun UNIX Language: Bourne Shell Problem: I am writing a script that allows user to key in a directory. Example: /root/tmp. Since the user can key in anything he/she wants, I need to validate to make sure that he/she does not key in anything funny i.e....

## Pop up dialog box on remote computers

I need to send out messages to over 100 clients in my sector. I want it to pop up a dialog box letting them know to save work and log out. I have the reboot script created just need the warning please. Thanks

## How Much Vacation Do You Take Every Year?

Please vote and comment: How much vacation from work do you take every year?

## write() issue during a low level hdd access

Hi, I am trying to write zeroes to the hdd using a c program. I don't want to use the dd or ddrescue or any such inbuilt program because of reasons like real time progress, writing custom patterns. (my program is more like an erasure application, but does only zero fill). here are the steps...

## Process file every minute

Hey guy's, How can I schedule this script using AWK, what I require is it runs every minute as new data will be added to the file? And I need to capture these data and save it to the output file. I tried using sleep 1 to allow the file to be processed but is not working. awk ' ...

thank you

## Removing VBSEO for vbulletin – Reverting back to vbulletin URLs

Please note, this information was copied from vbseo.com, now showing a database error. This is posted for reference since vbSEO seems to be going out of business: If you ever need to uninstall vBSEO , you can use the following instructions. Make sure you carefully follow each step. Login...

## Notes with Ravinder on Badging System Development Part II

Part II: Current PHP file Beta 73 Not Optimized: <?php \$version = 73; \$query = "SELECT * FROM " . TABLE_PREFIX . "user WHERE userid='" . \$uid . "'"; \$usertable = \$db->query_read_slave(\$query); \$modaluser = \$db->fetch_array(\$usertable); \$modaluser = gmdate("d F Y", \$modaluser); \$modaluser...

## Sneak Preview: New UNIX.COM UserCP VueJS Demo

Hey, Now that I'm caught-up on a number of forum tasks, I can turn my attention to the next-generation UserCP (and learn VueJS) for the site. Today I created this (not yet functional) demo using Vue; https://www.unix.com/cp/index.php What do you think?

## What editor does everyone use?

I was looking through the topics and I wasn't sure if this was the best place to post this question: I was wondering, out of curiosity, which software everyone was using to code their scripts in. I do mostly sh/ksh and my favorite has always been EditPlus because it is small, fast, yet powerful....