EmbLogic's Blog

how to print the result of an arithmetic calculation in a shell script

echo 4 +5

 

wat should i use to make its ans= 9 .

plz tell me the complete statement

2 Responses to how to print the result of an arithmetic calculation in a shell script

  1. hemant.kumar says:

    `expr 4 + 5`
    and mind the gap while you are writing this
    $((expression))
    two ways to calcualte this..

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>