Suppose I have the following initialization of bash array:
my_array=(
"/usr/bin"
"/usr/lib/*.so"
)
If I do iteration using:
for array_item in ${my_array[@]}
do
...
done
Then the content of the my_array
is expanded containing path to any files with .so extension in /usr/lib/ directories. but I just wanted the array contain two string which is "/usr/bin"
and "/usr/lib/*.so"
.
How should I do that?