1 05 Scripting and support
Stefan Tanta edited this page 2026-10-08 20:29:19 +02:00

Bash and support practices

Goal

Explain a small script and write a support report another engineer can act on.

A small Bash script

Save this as check-web.sh in your practice directory:

#!/usr/bin/env bash
if [ "$#" -ne 1 ]; then
    echo 'Usage: bash check-web.sh URL' >&2
    exit 2
fi

url="$1"
if curl --fail --silent --show-error --output /dev/null \
    --connect-timeout 3 --max-time 10 "$url"; then
    echo 'HTTP check passed'
else
    echo 'HTTP check failed' >&2
    exit 1
fi

Run it against your lab server:

bash check-web.sh "http://$server_ip/"
echo "$?"

Set server_ip first. $1 is the first argument; $# counts arguments. Quoting keeps a value together as one argument.

An exit status of zero means success by this script's definition. Status 2 means incorrect usage. Status 1 means curl reported failure.

--fail treats HTTP error responses of 400 or greater as failures. This check does not validate page content or follow redirects.

It is a reachability check, not proof that the whole application works.

Independent exercise

Test a working URL, a nonexistent path on nginx, and a call without arguments. Predict the message and exit status before each run.

Add a line showing which URL is checked. Keep the quoted variable. Explain every line before claiming scripting experience.

Python is another language commonly used for automation and structured data. For this interview, describe your actual Bash exercise honestly.

Support and escalation

Jira tracks work such as incidents and bugs. Confluence holds shared documentation. Exact workflows vary by organization.

A useful ticket includes:

  • Symptom, business impact, and affected systems.
  • Start time with timezone and relevant versions.
  • Reproduction steps and expected versus actual results.
  • Tests, sanitized evidence, and changes already attempted.
  • Current state and the specific help needed.

For an upgrade, confirm compatibility, a maintenance window, backup and recovery options, and post-upgrade checks. Follow the approved change process.

Escalate when impact, permissions, risk, or technical scope exceeds your role. Preserve evidence and explain what you have ruled out.

Explain aloud

  • How would you update a customer while the cause is unknown?
  • What would R&D need to reproduce a suspected bug?
  • What does your script actually test?

Completion check

Demonstrate all three script outcomes. Write a ticket from your troubleshooting exercise and explain it in English.

Next: Video delivery and RF basics