What is the syntax of "expr" command?

Answer Posted / jayachandran.g.r

it is used to use arithmatic operation in shell scripting

stntx: expr op1 opertor op2

where op1 and op2 may be any integer no(without any
decimalpoint)and operator can be
+ Addition
- Subtraction
/ division
% Modular
\* Multiplication


EX: $expr 1 + 3


o/p 4

Is This Answer Correct ?    31 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

determine the output of the following command: echo ${new:-variable}

542


What does echo $0 do?

576


How does path variable work?

542


Where are cowrie shells found?

570


What is option in shell script?

552






Is shell scripting easy to learn?

561


What does sh mean?

614


I want to create a directory such that anyone in the group can create a file and access any person's file in it but none should be able to delete a file other than the one created by himself.

590


How to replace following lines, catch (DAOException e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw new BOException(5122); } catch (BOException e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw e; } catch (Exception e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw new BOException(5122); } Needs to be changed in to, catch (DAOException e) { AppException.handleException (null, null, e, null, null, null, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 5122); } catch (BOException e) { AppException.handleException (null, null, null, e, null, null, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 0); } catch (Exception e) { AppException.handleException (null, null, null, null, null, e, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 5122); }

1848


I want to monitor a continuously updating log file, what command can be used to most efficiently achieve this?

742


What are the advantages of shell scripting?

580


What is basename in shell script?

582


What does chmod do?

570


how to print the 2-d, 3-d arrays in unix shell script programs please answer thi questio to my mail venusaikumar@gmail.com

2103


What are the advantages of shell script?

517