Skip to content
Advertisement

why is the error occuring when i am running the script.how can i fix it?

Here is the script was written which is based on while loop in shell scripting in Linux.

I used a variable and wanted to increase the value of it till the value is less than 10. What problems could have occurred in the script?

To find out I ran the script and the error is coming.

Image Reference

Advertisement

Answer

In line 6, try:

a=`expr $a + 1`

or

a=$(expr $a + 1)

not this

a='expr $a + 1'
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement