You can do this echo "${!var3}" trick in place of using eval, whichsince eval is considered "dangerous" and "evil". Here's the equivalent way to do this withFor understanding and education though, eval insteadhere is the equivalent way to do this with eval instead: