What is the syntax of "expr" command?
Answers were Sorted based on User's Feedback
Answer / swaroopa
while [ $num -gt 0 ]
do
i=`expr $i \* 10 + $num % 10`
num=`expr $num / 10`
done
Is This Answer Correct ? | 35 Yes | 10 No |
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 |
I want to monitor a continuously updating log file, what command can be used to most efficiently achieve this?
What is the first line of a shell script called?
What will happen to my current process when I execute a command using exec?
What lives in a shell?
What is Linux language details
What is the default ubuntu terminal?
how to create purchase order
How to enable the shell to know what program should be run to interpret the script?
how to print the 2-d, 3-d arrays in unix shell script programs please answer thi questio to my mail venusaikumar@gmail.com
What is echo in shell?
How do I run a powershell script?
Why are there shells on the beach?