Skip to content

Tag: bash

linux running few scripts launch from a central script

I have several bash script which contain in them infinite while loop. I would like to run all of them from a single script: what I get is that it stuck on the first script and it does not proceed to the next one to run them simultaneous. Answer Notice the & symble at the end of each line, that

Running script in crontab–reboot: command not found

I’ve set a script in my root crontab that is supposed to restart my machine with the reboot command. However, I am getting a reboot: command not found despite the fact that reboot is in the root user’s path. My script: root user crontab: …yes, this is only a temporary workaround while I figu…

sudo doesn’t work, but root user works [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 …

“usermod: UID ‘0’ already exists” why?

As part of my Docker image I have the following ENTRYPOINT script: The image compiles successfully. When I try to run the container by running the following command docker run -it temp bash I got the following output: Why my UID is 0? I can’t find where is my error here, any help is more than welcome. U…

How to rename file name contains backslash in bash?

I got a tar file, after extracting, there are many files naming like I want to correct their name into files in sub-directories like I face a problem when a variable contains backslash, it will change the original file name. I want to write a script to rename them. Answer Parameter expansion is the way to go.…

Automatically close PuTTY when connection is lost

I have a script in bash, running multiple PuTTY sessions. For example, I open the connection to run a couple of commands, when it finishes it saves the values, closes the session, opens a new session and runs a couple more. This script is supposed to run for 60 hours, more or less, so i need to have everythin…