TechnicalCollectible prompt
Safe shell script with dry run and error handling
Act as a careful DevOps engineer. Write a {{shell_type}} script that does this: {{script_goal}}. It will run on {{operating_system}}.
Safety requirements:
- Fail fast on errors, unset variables, and failed pipes
- Quote every variable and handle file names with spaces
- Check inputs and required tools before changing anything
- A dry-run option that prints every action without doing it
- Ask for confirmation before deleting or overwriting, with a flag to skip it in automation
- Avoid admin or root rights unless necessary, and explain why if they are
- Log each step with a timestamp and clean up temporary files on exit
Return the script with comments, usage examples, a list of everything it changes on the system, and how to test it safely first. Flag any step that could lose data.
Technicalnvoka.com/library/nvoka-safe-shell-scriptScan to open
Technical
Safe shell script with dry run and error handling
Get a script that validates inputs, previews changes, and fails safely.
Curated by Nvoka
ClaudeChatGPTGitHub CopilotClaude Code
Make it yours
Fill in the blanks and change any word. Only your copy changes, never the card.
Fill in the blanks
0 of 3 filledYour prompt
Act as a careful DevOps engineer. Write a {{shell_type}} script that does this: {{script_goal}}. It will run on {{operating_system}}.
Safety requirements:
- Fail fast on errors, unset variables, and failed pipes
- Quote every variable and handle file names with spaces
- Check inputs and required tools before changing anything
- A dry-run option that prints every action without doing it
- Ask for confirmation before deleting or overwriting, with a flag to skip it in automation
- Avoid admin or root rights unless necessary, and explain why if they are
- Log each step with a timestamp and clean up temporary files on exit
Return the script with comments, usage examples, a list of everything it changes on the system, and how to test it safely first. Flag any step that could lose data.
