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 |
Explain about the slow execution speed of shells?
What's the difference between scripting and coding?
What is subshell?
Why should we use shell scripts?
What is egrep?
How do I edit a .sh file?
what is "umask"?
What is the syntax of "nested if statement" in shell scripting?
What is bash coding?
What is shell chemistry?
How to print all the arguments provided to the script?
How would you print just the 25th line in a file using smallest shell script?