Answer Posted / 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 |
Post New Answer View All Answers
Write a shell script that adds two numbers if provided as the command line argument and if the two numbers are not entered throws an error message.
What is bash used for?
What is the use of echo in shell script?
In my bash shell I want my prompt to be of format '$"present working directory":"hostname"> and load a file containing a list of user-defined functions as soon as I log in, how will you automate this?
Explore about environment variables?
What is a shell in operating system?
When should shell programming/scripting not be used?
Write a script to print the first 10 elements of fibonacci series.
how to print the matrix form of 2-d, 3-d arrays in unix c shell scripts ?
What is bourne shell scripting?
What can scripts do?
What is the use of "$#" in shell scripting?
How can any user find out all information about a specific user like his default shell, real-life name, default directory, when and how long he has been using the system?
How do I open the shell prompt?
Why are there shells on the beach?