Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

   

 

  Oracle Tips by Burleson

Evaluating expressions

Shells can evaluate complex expressions and allow you to perform math functions. The following examples demonstrate some simplistic math.

$ expr 6 + 3

9

$ expr 6 + 3 + 8

17

$ expr 8 - 2

6

$ expr 12 / 3

4

$ expr 15 \* 3

45

$ expr 20 % 3

2

$ echo `expr 15 + 3`

18

In the examples above:

The multiplication example uses an escape character before the * so that the * is not interpreted as a wildcard symbol.

20 % 3 is read as 20 mod 3 and yields the remainder when 20 is divided by 3.

The last example uses the backward quote sign (`) to enclose the command. The command within the backward quotes is executed and the result echoed to the screen.

Since we mentioned the use of the backward quote (backtick), this is probably a good time to explain the rules regarding the use of quotes:

Double quote () variables are expanded when enclosed in double quotes

Single quote () variables within single quotes are not expanded

Backward quote (`) enclose commands

The use of single versus double quotes

$ myname='Terry Clark'

$ echo 'My name is $myname'

My name is $myname

$ echo "My name is $myname"

My name is Terry Clark

 

The above book excerpt is from:

Easy Linux Commands
Working Examples of Linux Command Syntax

ISBN: 0-9759135-0-6   

Terry Clark 

http://www.rampant-books.com/book_2005_1_linux_commands.htm 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational