unset array[0]
removes the element but still if I do echo ${array[0]}
I get a null value moreover there are other ways of doing this but if an element of an array contains spaces like below
array[0]='james young'
array[1]='mary'
array[2]='randy orton'
but these also fail to do the job
array=${array[@]:1} #removed the 1st element
now I want the new array to be like
array[0]='mary'
array[1]='randy orton'
The spaces cause the trouble after assignment and the actual array becomes like with substitution.
array=(mary randy orton)