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 the basic difference you find between a shell script and perl?
What is the difference between a shell variable that is exported and the one that is not exported?
How to print some text on to the screen?
What language is used in terminal?
how will you find the total disk space used by a specific user?
what is the meaning of First line of shell script ,what is meaning of #! pleas explain brifly
How to sort a result of Ls -l command based on columns. Ex. i want to sort 5th column from output of ls -l command.
What is MUTEX?
How Connect to a Database in Shell Programming?
What language is bash?
What does it mean by #!/Bin/sh or #!/Bin/bash at the beginning of every script?
Explain about gui scripting?