First let me state my problem clearly:
Ex: Let\'s pretend this is my array, (the elements don\'t matter as in my actual code they vary):
array=(jim
Try this:
user@pc:~$ array=(jim 0 26 chris billy 78 hello foo bar) user@pc:~$ for itm2rm in chris 78 hello; do array=(\`echo ${array[@]} | sed "s/\<${itm2rm}\>//g"\`); done ; echo ${array[@]} jim 0 26 billy foo bar