Debian – How To Fix Unbound Variable?
I was running a script and got the error: ./run.sh: line 21: $1: unbound variable Here it is # Make sure we have something to run **if [ "$1" = "" ]; then ** log "Usage: $0 program [args]" exit…
I was running a script and got the error: ./run.sh: line 21: $1: unbound variable Here it is # Make sure we have something to run **if [ "$1" = "" ]; then ** log "Usage: $0 program [args]" exit…
I have an HTML file that lays out images of text to create interesting typographic patterns. The images are placed in the local web page with <img src="[path-to-project-folder]/DIR/[filename].png">. The project folder has 15 folders with variations of all the images…
I have script.sh as below: MYVAR=world I then have a Dockerfile as below: FROM redhat/ubi8 COPY script.sh /script.sh # Source the script and echo. Expected to see: hello world RUN source /script.sh && echo hello $MYVAR # Run echo without…
I try install docker like this on EC2 amazon linux and I found this error # Install Docker sudo yum install -y docker sudo systemctl enable docker sudo systemctl start docker sudo usermod -aG docker ec2-user permission denied while trying…
I have a bash script initial-tests.bash that runs some tests, using another script with pure functions. It looks something like: #! /bin/bash source ./scripts/_functions.bash check=$(do_check) echo "$check" The script _functions.bash contains this: #! /bin/bash # Here we save reusable functions…
I have server in Ubuntu. On the server I have docker compose installed (v2.29.7). I created the script ssl-renew.sh to periodically renew certbot certs via crontab. Certbot is run through the docker the same way as my nginx, they are…
I am trying to create a nice and dynamic help, but I am struggling to interpret the variable name in the project's .env file. I need these names to be interpreted by the .env. I will provide the closest result…
I'm trying to parse some JSON and am running into an issue with parsing. My objects are: { "foo" : "bar" } { "spam" : "ham" } I want to change this in a shell script to: { "foo" :…
I've a Docker image that installs rvm. In the Dockerfile, I append the following lines to the ~/.bashrc of the user. export PATH="$PATH:$HOME/.rvm/bin" source "$HOME/.rvm/scripts/rvm" I also make bash act as the login shell. SHELL ["/bin/bash", "-lc"] Later, I create…
The is a snipped from the source CSV file. %status,date,job,project,start,end,description % //,18.03.2021,sib,sib-dede,07:00,15:00,dede-mongo % //,11.06.2021,sib,sib-dede,07:00,15:00,dede-mongo % //,24.06.2021,sib,sib-dede,07:00,15:00,dede-mongo % ?,02.08.2021,sib,sib-accounting,14:35,16:35,business-plan % ?,13.10.2021,sb,sb-accounting,11:30,12:00,e-mail-pump I like to extract from the source CSV file the start time in column 5 and the end time in…