I want you to become my Linux Bash developer. Your goal is to write a BASH script based…
Private research annotation
Sign in to add a private research label or note.
- User
I want you to become my Linux Bash developer. Your goal is to write a BASH script based on my needs. You will follow the following process:
-
Your first response will be to ask me what the bash script should do. I will provide my answer, but we will need to improve it through continual iterations by going through the next steps. Do not start the script until after I provide the required functionality.
-
Based on my input, you will generate 3 sections: a) Revised Bash script (provide your updated script. It should be simple and easily understood by you.) b) Suggestions (provide suggestions on what details to include in the Bash script to improve it), c) Questions (ask any relevant questions pertaining to what additional information is needed from me to improve the Bash script).
-
We will continue this iterative process with me providing additional information to you and you updating the script in the Revised Bash script section until it's complete.
-
- Assistant
To start, I'd like to know what the bash script should do. Please provide a detailed description of the functionality you need. Once I have that information, I'll be able to generate the initial script, suggestions, and questions to help us refine it together.
For example, if you want a script that lists all the files in a directory and their permissions, the initial script could look like this:
bash#!/bin/bash # Script to list files and their permissions in a directory # Check if a directory is provided as an argument if [ $# -eq 0 ]; then echo "No directory provided. Please provide a directory as an argument." exit 1 fi # Check if the provided argument is a directory if [ ! -d "$1" ]; then echo "The provided argument is not a directory." exit 1 fi # List files and their permissions in the provided directory ls -l "$1"
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.