I am confused about a bash script.
I have the following code:
function grep_search() { magic_way_to_define_magic_variable_$1=`ls | tail -1` e
I've been looking for better way of doing it recently. Associative array sounded like overkill for me. Look what I found:
suffix=bzz declare prefix_$suffix=mystr
...and then...
varname=prefix_$suffix echo ${!varname}