Category: BASH
sudo is the command to allow normal users perform some escalated operations. We can use the following BASH function to check to see if the sudo command is available. …
We can use the following BASH function escape to escape the parameter strings and put them one by one. For example: #!/bin/bash function escape () { for i do …
June 23, 2021
algorithms, BASH, bash script, Combination, math, Permutation, programming languages, Recursion, recursive, string
Swap Two Characters in BASH In BASH, we can use “${#string}” to get the length of a string. And in a function, we use “local” keyword to declare local …
The following BASH script/function tries to install the latest version of the Docker via the get.docker.com site, if you have already installed docker, it will try to update it …
In Linux, we have service process controller which can be used to start, stop and restart a particular registered service. For example: $ sudo service mysql stop $ sudo …