Sample Header Ad - 728x90

How many levels of indirection can I apply in Bash?

2 votes
2 answers
435 views
In bash, I understand we can have variable indirect expansion via two ways: - Using declare: declare -n foo=bar - Using the ${!..} expansion. We can combine both: declare -n foo=SHELL bar=foo echo ${!bar} gives: /bin/bash Is it possible to extend this to more levels? --- It's mostly as for writing obfuscated code - some of my friends are challenging each other.
Asked by user322103
Nov 21, 2018, 01:30 PM
Last activity: Nov 25, 2018, 09:53 PM