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

How do I run a shell script on a mac?

725


What are the types of script?

687


Explain about the slow execution speed of shells?

863


What does it mean to debug a script?

653


How do I run a .sh file?

684






What is wc in shell script?

625


What is the use of break command?

668


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

854


Can you write a script to portray how set –x works?

633


What does it mean by #!/Bin/sh or #!/Bin/bash at the beginning of every script?

654


How will you find the 99th line of a file using only tail and head command?

2138


Is powershell a language?

653


What is shell environment?

621


What are zombie processes?

651


What does chmod do?

655