So lets say you have a text file called list.txt with entries like: What if you wanted to pick a random entry? The easiest solution is to use the ‘shuf’ tool, which is standard on CentOS as part of coreutils. The output would be a random line from our file!
Sometimes you need to print a specific amount of characters from each line output. This can seem like a challenge, but if you know a little awk magic it’s actually not that bad. Below is an easy example of how to output a set amount of characters per line via bash and awk. Print the