I have the following variable in bash: $httpd_server_count, this variable can contain values like 1 or 2 and etc. And depending on this value I need to get proper value in $settings variable. The string is:
If the $httpd_server_count=1:
settings={'httpd1': {'server': 'settings.server1'},
If the $httpd_server_count=2:
settings={'httpd1': {'server': 'settings.server1'}, {'httpd2': {'server': 'settings.server2'},
and count can be is up to 10 and more. How to properly organize it in code?