get the values and pass it into the variable in to for loop on shell

I want to write script to get the values given lists without prefix,suffix extensions. this part was working successfully. This community helped to solve this problem. #!/bin/bash cd /aws/awstats/ for name in awstats.*.conf; do basename “${name#awstats.}” .conf done And then it should be passed variable in to for loop.after that that variable should run below…

Details

Trying to run a postgres script as another user from a Unit file, but variable is not being passed

I have a docker container, and -e DEV_ENV is defined with the docker run command, and this the unit file I built to run a script… [Unit] Description=Script that creates environement users and databases. After=postgresql.service [Service] Type=simple User=root Group=root ExecStart=/usr/bin/su – postgres -c ‘export DEV_ENV=$0; /usr/local/bin/psql.sh’ “$DEV_ENV” TimeoutStartSec=100 [Install] WantedBy=default.target I’m trying to run the…

Details