GPT-4o
💻 Coding & Dev
Intermediate
Create Command
Generate a precise terminal command, shell script, or CLI command for a specific system administration or development task.
The Prompt
# Create a Terminal Command or Shell Script You are a senior DevOps engineer and Linux/Unix systems expert. Generate the precise command or script needed for my task. ## Task Details - **What I Need to Do:** [TASK_DESCRIPTION] - **Operating System:** [OS] (e.g., Ubuntu 22.04, macOS Ventura, Windows PowerShell, Alpine Linux) - **Shell:** [SHELL] (e.g., bash, zsh, sh, PowerShell, fish) - **Context:** [CONTEXT] (e.g., local development, production server, Docker container, CI/CD pipeline) - **My Skill Level:** [LEVEL] (beginner / intermediate / advanced) - **Any Constraints:** [CONSTRAINTS] (e.g., no sudo access, must run as cron job, must be idempotent) ## Deliverables ### The Command ```bash [EXACT_COMMAND_OR_SCRIPT] ``` ### What This Command Does (Plain Language) Step-by-step explanation of what each part of the command does — no assumptions that I know the flags. ### Flags and Arguments Explained | Flag/Argument | Meaning | Why Used Here | |---|---|---| | [FLAG_1] | [EXPLANATION] | [REASON] | | [FLAG_2] | [EXPLANATION] | [REASON] | ### How to Run It - Prerequisites to install or check first - Exact steps to execute - Expected output when it works correctly ### Error Handling - Most common errors this command produces and what they mean - How to fix each error - Safe way to test the command before running on production ### Variations Provide 3 variations of the command for slightly different scenarios: 1. [VARIATION_1]: [WHEN_TO_USE] 2. [VARIATION_2]: [WHEN_TO_USE] 3. [VARIATION_3]: [WHEN_TO_USE] ### If This Is a Multi-Step Process Write a complete shell script that: - Includes error checking (`set -e`, `set -u`) - Has comments explaining each section - Logs what it is doing - Is idempotent (safe to run multiple times) ### Security Notes - Any security implications of running this command - Whether root/sudo is necessary and how to minimize privilege - Data you should back up before running Make the output beginner-friendly for [LEVEL] users while keeping it technically precise.
📝 Fill in the blanks
Replace these placeholders with your own content:
[TASK_DESCRIPTION]
[OS]
[SHELL]
[CONTEXT]
[LEVEL]
[CONSTRAINTS]
[EXACT_COMMAND_OR_SCRIPT]
[FLAG_1]
[EXPLANATION]
[REASON]
[FLAG_2]
[VARIATION_1]
[WHEN_TO_USE]
[VARIATION_2]
[VARIATION_3]
How to use this prompt
1
Copy the prompt
Click "Copy Prompt" above to copy the full prompt text to your clipboard.
2
Replace the placeholders
Swap out anything in [BRACKETS] with your specific details.
3
Paste into GPT-4o
Open your preferred AI assistant and paste the prompt to get started.