Array - Replace elements or replace matched words in linux shell array

Array - Replace elements or replace matched words in linux shell array
Array - Replace elements or replace matched words in linux shell array

In this article we can learn how to replace elements,words,characters in linux bash shell arrays.

usage:
echo ${array[@]//substring/replacedstring}

example1) Remove 'ltc' then replace 'bch':

1e.g:
2 arrayNames=( btc eos eth usdt ltc)
3 echo ${arrayNames[@]//ltc/bch}

example2) Remove 't' then replace '0':

1e.g:
2 arrayNames=( btc eos eth usdt ltc)
3 echo ${arrayNames[@]//t/o}