DevOps

Unable to run NGINX Docker due to “13 Permission denied”
The Problem The NGINX docker container was started using the below command: # docker run --detach --name nginx_server nginx 4ffbcd5ee796b8cce3f2c6ed4...
How to Use user-defined Functions in awk
User-Defined Functions You can create user-defined functions in a awk script file using the func or function keywords. Placement in the file is not im...
Using Loops (while, for) in awk scripts
The awk programming language contains many of the programming concepts that are used in shell scripting. Conditionals, such as the if statement and lo...
How to Make a Variable read-only (constant) in Bash and Korn Shell
Creating Bourne Shell Constants A variable can be made read-only with the following syntax: readonly var[=value] The square brackets around =value ...
Beginners Guide to Using “trap” to Catch Signals and Handle Errors in Shell Script
Shell Signal Values A signal is a message that some abnormal event has taken place or a message requesting another process do something. The signal is...
Examples of “shift” Command in Shell Scripts
The shift Statement Sometimes a script does not require a specific number of arguments from users. Users are allowed to give as many arguments to the ...
Korn Shell select Loop
The select statement in the Korn shell creates a menu. This construct is for the Korn shell only. The syntax for creating a menu is: select var in l...
How to use until loop in Shell Scripts
The until Loop The until loop is very similar to the while loop, except that the until loop executes as long as the command fails. After the command s...
“while” Loop Examples in Shell Scripts
The while loop allows you to repeatedly execute a group of statements while a command executes successfully. The syntax for the while loop is: while...