I want to automate having a file that tracks all my installed brew packages. I can do this manually with brew list > somefile, how ever I want this process t
I have a script, that is running inside the docker container some actions we need for some internal debugging purposes: set -eu echo "Starting i/o test for hos
Hi I am making one script for which I would like it, that through one command it would be possible to make a more complex command or function. The problem is th
I am running a command ./startup.sh nginx:start and I am getting this error message zsh: permission denied: ./startup.sh why could this be happening?
I have the same Bash script that I am running on Linux, Mac, and Windows (with Git Bash). How can I make sure that the path is converted to a Windows-style path
I have a shell script version.sh in which i have code like. #!/bin/sh data = `lsb_release -a` echo $data it returned me the output like: Distributor ID: Ubuntu
How to wait in bash script to subprocess and if one of them return exit code 1 so I want to stop all subprocess. This is what I tried to do. But there are a som
I've made an executable jar file for a terminal game that can be opened by typing java -jar name.jar in the Terminal. Then I made a .sh file inside the same fol
I'm running shellcheck on my scripts and often get this warning (which in this case is correct, because cd foo bar baz makes no sense): cd ${SOME_DIR} || exit 1
I have a PHP script that executes a shell command to find the common items between two files given. This is the beginning of my PHP script: $E7Bonded_File = "
I have this shell script which works on my machine just fine. To test the script I have a VM with the same OS Version, MacOSCatalina. On the "real machine" the
Assuming I have a bash script test.sh: #!/bin/bash # Comment 1 echo "Hello world" # Comment 2 echo "Hi there" I know after making the bash script executable
I am working in linux environment as a non root user. I am using users command to get the logged in users users But it returns the user names multiple times
I'm writing a script to preform a repetitive task that only changes basic values and locations such as user name. I've written up code that prompts for a usern
I have 2 files file1 and file2. Inside file1 I declare a var, x=1. In file2 I make a var x=2. If I run file one then file two, and then in the shell echo x, I g
I have two lists of strings (with whitespace in each string), and want to read them one by one. The length of the strings are the same, so I get the length of o
I am trying to run a cronjob inside a docker container that invokes a shell script. Yesterday I have been searching all over the web and stack overflow, but I c
Here are a series of cases where echo $var can show a different value than what was just assigned. This happens regardless of whether the assigned value was "do
I've been having a lot of trouble trying to get a Jenkinsfile to work. I've been trying to run this test script: #!/usr/bin/env groovy node { stage('Build
When writing shell programs, we often use /bin/sh and /bin/bash. I usually use bash, but I don't know what's the difference between them. What's main difference