Skip to content
Advertisement

Tag: bash

Find and Execute Scripts in Subdirectories

I have a filesystem structured like this: Parent Directory orchestrator init.sh Subdir1 install.sh Subdir2 install.sh Subdir3 install.sh Within the init.sh, I have: This works for the most part, but it is fragile. If one of the install.sh scripts encounters a problem, the init.sh script stops. I’d like for it to continue on to the next install.sh script if this happens.

How to save the text from a link in bash file?

I am trying to write a script that automatically makes a new website on my server. one of the steps is to go to this link and copy the salts into my wp-config.php file: https://api.wordpress.org/secret-key/1.1/salt/ I’m new to bash script and hoping this would be easy to do. I’m not sure if I need to save it as a text

How does the neofetch ascii logo determine which color to use?

I am making custom ascii text-images for a cli app, and was curious how these custom colors are designed. Any ideas? Thank you, Answer If you look at neofetch script on it github page, and search for any distro to see the ascii logo, you will see some codes between some letters, this codes are interpreted by the terminal as

Bash – format .txt file into pover pivot form

txt file called without_Commas.txt. The content looks like this: I need to format this data to look like this: Is there a way to do this? Kind Regards Elias Answer On each line, this loops over all the field numbers starting with the third field. Then it prints the first field ($1) followed by the current field in the loop

delete all files except a pattern list file

I need to delete all the files in the current directory except a list of patterns that are described in a whitelist file (delete_whitelist.txt) like this: How can I perform this in one bash line? Answer Any bash script can fit on one line: Check the output and then, if it’s OK:

How to fix The terminal process “/usr/sbin/nologin” failed to launch (exit code: 1) error in VSCode [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question

Docker run with arguments from a configuration file

I’ve built a docker image in order to publish a jupyter notebook to my team. The jupyter notebook runs inside a docker container by running a docker run command containing numerous arguments (such as mounts and environment variables for AWS credentials). The current instructions I published for running the docker require you to copy and paste the entire docker run

Advertisement