I am running a program where in I have this command
which is giving error the shift: number is not correct.
can you please tell me how shift actually works?
the line which is giving error is-
set $PARAM; shift; shift; shift; shift; shift; shift; shift; shift
Is it related somewhere to these parameters which is set before this line
PARAM=$*
"The positional parameters from $N+1 ... are renamed to $1 ... If N is not given, it is assumed to be 1.
"
The is the same as:
shift 8
Have you checked whether there are as many as 8 parameters?
What ARE you trying to do? What is the point of resetting the already existing parameters? And if you do it that way, you will also be performing word splitting on the parameters.
I'm not going to correct that convoluted code. There are far too many things wrong with it.
Read the man page for your shell, and learn to use getopts.