Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ev(1) [linux 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 SEE ALSO
icalc(1), rcalc(1) RADIANCE
10/28/96 EV(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 SEE ALSO
icalc(1), rcalc(1) RADIANCE
10/28/96 EV(1)
Man Page

11 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

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.... (37 Replies)
Discussion started by: totziens
37 Replies

2. Shell Programming and Scripting

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 (35 Replies)
Discussion started by: deaconf19
35 Replies

3. What is on Your Mind?

How Much Vacation Do You Take Every Year?

Please vote and comment: How much vacation from work do you take every year? (40 Replies)
Discussion started by: Neo
40 Replies

4. Programming

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... (35 Replies)
Discussion started by: sponnusa
35 Replies

5. Shell Programming and Scripting

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 ' ... (35 Replies)
Discussion started by: James_Owen
35 Replies

6. Shell Programming and Scripting

Eval

thank you (35 Replies)
Discussion started by: ratnalein88
35 Replies

7. What is on Your Mind?

What do you do for a living?

(107 Replies)
Discussion started by: ilikecows
107 Replies

8. Web Development

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... (37 Replies)
Discussion started by: Neo
37 Replies

9. Web Development

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... (48 Replies)
Discussion started by: Neo
48 Replies

10. Web Development

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? (36 Replies)
Discussion started by: Neo
36 Replies

11. Open Source

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.... (409 Replies)
Discussion started by: yongho
409 Replies