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 |
Is shell a scripting language?
How will you list only the empty lines in a file (using grep)?
What are the two files of crontab command?
What are the different types of variables used in shell script?
What can you do with powershell?
How to set an array in linux?
c program which accept one argument as a directory name and prints all the file name along with its inode number and total count of the file in directory
What are the advantages of shell scripting?
What is echo in shell?
How can the contents of a file inside jar be read without extracting in a shell script?
What is the conditional statement in shell scripting?
what are special characters and explain how does text varies by the usage of single quotes,double quotes and back quotes?