← All projects
intermediate7h
Build a Safe Project Validation CLI
Build a real, local Bash CLI tool that validates a project folder's structure and content — defensive scripting (set -euo pipefail), text-processing checks, cleanup traps, and distinct, meaningful exit codes. Runs entirely on your own machine; this platform does not execute shell commands.
Tracks: Linux & Shell Fundamentals
Objectives
- Write a Bash CLI that parses arguments and prints clear usage/help output
- Implement at least 4 distinct, safe (non-destructive) validation checks against a real project folder
- Use set -euo pipefail, a safe temp file via mktemp, and a cleanup trap registered on EXIT
- Use grep/sed/awk-based text-processing checks against real file content
- Design distinct, documented exit codes and a clean ShellCheck run, suitable for CI use
Before you start
- The Linux Filesystem Model and Navigation
- Standard Streams, Pipes, Redirection, and Exit Codes
- Text Search and Transformation: grep, sed, and awk Foundations
- Environment Variables, PATH, and Executable Files
- Shell Scripting: Parameters, Conditions, Loops, and Functions
- Defensive Scripting: set -e, set -u, and pipefail
- Temp Files, Cleanup Traps, and Logging
- Catching Bugs Early: ShellCheck and Portability
- Running Scripts Unattended: cron and CI Execution
Milestones
0%