Not sure if I worded the title correctly. It's easiest to explain with an example...
See what I'm trying to do there? I need to combine the $VAR$i so instead of outputting "fail1" and "fail2" it outputs "cool" and "neat".Code:VAR="fail" VAR1="cool" VAR2="neat" for i in 1 2 ; do echo $VAR$i done
I tried various things such as $(VAR$i) but I'm just stumbling here. Couldn't find anything on Google either. Help a noob about? Thanks.
Bookmarks