Module Title: dgt_bash03 – Command Execution
Description:
“dgt_bash03 – Command Execution” is a module on how commands are executed in Bash, intended for beginners and intermediate users. This module covers the essentials of command execution, with a special focus on output redirection—standard output (stdout), standard error (stderr), and standard input (stdin).
In line with the academy’s natural-language approach, you first study how Bash runs a command, where its streams go and how redirection and pipes rewire them. In the practical part you never type the commands yourself: you tell the machine in plain language what you want (“run the backup script, keep the errors in a separate log and append everything else to the daily report”) and then read the command line it produces, checking that every redirection and every pipe sends each stream exactly where you intended.
Module Objectives:
-
Understand Basic Command Execution: Learn how the shell runs commands and what the main options in Bash do, so you can tell the machine precisely what to execute.
-
Explore Output Redirection Techniques: Understand how stdout, stderr and stdin can be redirected, so you can recognize whether the redirections the machine proposes are correct or silently lose data.
-
Natural-Language Practice: Work through realistic scenarios by instructing the machine in plain language, then reviewing, verifying and correcting the commands and output it produces.
Key Topics:
- Executing Commands in Bash:
- Introduction to Bash scripting
- Running simple commands and scripts
-
Command-line arguments
-
Understanding Streams:
- Standard Output (stdout)
- Standard Error (stderr)
-
Standard Input (stdin)
-
Output Redirection Basics:
- Redirecting stdout to files using
> - Appending output with
>> -
Redirecting stderr separately using
2> -
Advanced Redirection Techniques:
- Combining stdout and stderr redirection
- Using pipes (
|) for chaining commands -
Using process substitution
-
Practical Scenarios in Natural Language:
- Real-world tasks described to the machine in plain language
- Exercises in reviewing the redirections and pipelines the machine builds, and spotting the ones that lose or misroute output
Target Audience:
This module is intended for system administrators, DevOps engineers, software developers, and anyone who wants to understand how Bash executes commands and manages output streams, and to apply that knowledge by directing an AI agent instead of typing commands by hand.
By the end of this module, you will be able to explain to the machine exactly how a command should run and where its output should go, and to verify that what it executed matches your intent.
The students can push their exercises (prompts, generated commands and review notes) to the Academy DevOps & SRE Git project. For this module, create a folder with your username as its name in the following subfolder: https://github.com/Garanti-Del-Talento/gdt_academy
