▸case-21 When updating a critical system configuration file in a script, writing directly with `>` can corrupt the file if the script dies mid-write. How can a script perform atomic file updates safely? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-05 Write a minimalist container startup script in strict POSIX sh syntax without bashisms to check if a local database port is open. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-06 Create an Ansible task file in YAML format to ensure the nginx service is started and enabled on target Linux nodes. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-12 We have a system script that manages database backups. For security reasons, it must never be executed directly as the root superuser. Show how to enforce this check at the start of the script. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-18 Before executing external dependencies like `jq` or `aws`, our script needs to verify that these binaries exist on the host system. How should command existence be checked reliably across Linux and macOS distributions? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-14 I need to read a CSV file line by line in Bash to process user records. Some fields contain spaces and special characters. How should I iterate through the file safely without word splitting issues? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-07 Create a standard initialization header block for a Linux automation script that handles deployment artifacts. I want to make sure it stops immediately on subtle pipeline errors or undefined variables. What shell settings should be put at the top? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-11 In our deployment scripts, when an unexpected command failure occurs, we want to capture the exact line number that failed before exiting. How do you set up an error trap in Bash to log this information? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-02 Can you write a production-grade Bash utility to parse a configuration file, copy build artifacts to a remote staging server, and verify file integrity? I want it to be robust against unhandled failures, use safe variable practices, and include a dry-run option before executing file transfers. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-08 I am writing a script that cleans up a build directory passed as a command-line parameter. If someone passes an empty argument or an unbound variable, I don't want it deleting files in the root directory. Show how to validate the input path safely. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-01 I need a Bash script for our CI/CD pipeline that backs up a target database directory and archives log files. It should handle errors gracefully, log progress clearly, validate user arguments before proceeding, and ensure cleanup if something fails mid-execution. Please generate the complete shell script. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-13 Write a script parameter parsing block that handles flags `-h` (help), `-v` (verbose), and `-f <file>` (input file). It should fail gracefully if unknown flags or missing argument values are passed. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-10 We are building a script to purge stale cache directories across system storage. We need a way to preview which directories would be deleted before running the actual deletion. How should this be implemented in Bash? | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-15 Our scheduled cron job script syncs remote storage every 5 minutes. If a previous instance is still running, the new instance should exit immediately. What is the race-condition-free way to implement lock files in Bash? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-03 We need a system maintenance shell script that rotates old application logs and removes temporary cache files safely. Please provide a script that incorporates proper error traps, input checking, structured logging, and safety controls to avoid accidental deletion. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-09 I need to write temporary output data to disk inside a Bash script during a multi-stage data processing job. What is the standard safe way to create temporary files in `/tmp`? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-17 We want all log output from our infrastructure script to include standardized timestamps and log levels. Error messages specifically must be routed to standard error. Show a defensive logging function design. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-16 I am writing a script that counts matching log entries in a file using a while loop. However, when I increment a counter inside a loop fed by a pipe `cat file | while ...`, the final count variable is lost after the loop finishes. How do I fix this issue cleanly in Bash? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-20 We have an interactive script that asks for human confirmation before applying infrastructure changes, but it must non-interactively abort or take a safe default if no input is received within 10 seconds. How do you implement this in Bash? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-22 If a user presses Ctrl+C or a container orchestrator sends a termination signal to our worker script, it needs to clean up locks and exit gracefully. How should signal handling be set up? | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-04 Give me a quick bash one-liner command to recursively find all log files over 100MB in /var/log and print their file sizes. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-19 I need to parse a comma-separated list of IP addresses stored in a variable into a Bash array. If I modify `IFS` to split the string, how do I ensure it doesn't break string parsing elsewhere in my script? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |