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 |
What is bourne shell scripting?
What's the difference between scripting and coding?
What does $1 mean in bash?
What does sh mean?
What is a scripting language simple definition?
What is the syntax of "grep" command?
What is use of "cut" command?
Why is a script important?
determine the output of the following command: echo ${new:-variable}
What command needs to be used to take the backup?
Can you write a script to portray how set –x works?
Where cron file kept?