Back to course

Bash Scripting for Automation

Modern DevSecOps (The Hard Way)

Automation is Key

In DevSecOps, if you do it twice, script it. We use Bash to glue security tools together.

Script Structure:

bash #!/bin/bash set -e # Exit on error

echo "Starting Security Scan..."

Command goes here

Exercise:

Write a script that checks if a specific service (like nginx) is running and logs the status to a file with a timestamp.