Nieuws

The POSIX (Portable Operating System Interface) style syntax can be used with POSIX compliant shells like bash and can be used to iterate over a list of files, any sequence, or even the output of ...
In Bash shell scripting ... automatically converts it into a single line loop. Let’s start with a simple example. From the previous section, you might have understood that the for loop accepts a list ...
#!/bin/bash until [ "$*" = "" ] do file_name="$1" out_name=$(basename "$1" '.avi').mp4 HandBrakeCLI -v -i "$1" -o "${out_name}" --preset="Universal" shift done I'm ...
How to use a Bash script for-loop for system administration ... with i or I), meaning to cat the servers text file and return one-by-one each host name to use to conduct the commands following ...
The while loop is mostly used when you have to read the contents of the file and further process it. Reading and writing to a file are common operations when you write bash scripts ... is set to comma ...
This repository demonstrates a common error in bash scripting related to handling filenames containing spaces. The script bug.sh attempts to process a list of files ...
This code iterates through all the roles specified in the ROLES variable, and then prints "I want to be a ", the role in each iteration. This can be very useful when configuring a files with different ...