Learn › RHCSA (EX200)
Shell Scripts
Create simple shell scripts with conditionals, loops, arguments, and command output capture. The exam expects you to write scripts that automate real tasks under time pressure.
Labs in this module
- Conditionals: if, test, [ ] - Make a script decide with test and its [ ] twin. File tests -f -d -e -r -w -x, string compares = != -z -n, numeric compares -eq -ne -lt -le
- for Loops Over Files and Output - Run the same block once for every item with a for loop. The fixed for VAR in LIST; do ...; done shape, and four lists that feed it: an expli
- Script Inputs and Exit Codes - Write a real runnable script that takes command-line input and reports success or failure. The shebang, chmod +x, running with ./, the posit
- Capturing Command Output - Run a command and keep its output as a value with command substitution. Capture into a variable with $(command), splice inline, do integer m
- Mission Control: Operation Toolsmith - The RHCSA shell-scripts capstone mission on a real RHEL 10 machine. Write the classic exam script ~/bin/inspect to an exact spec, graded by