messages
listlengths
3
3
category
stringclasses
3 values
utility
stringclasses
89 values
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "Create a script that deletes files older than 21 days from /tmp, logging each removal." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\ntarget=/tmp\nage=21\nfind \"$...
script
find
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Edit data.conf in place, replacing 'localhost' with 'token'." }, { "role": "assistant", "content": "sed -i 's/localhost/token/g' data.conf" } ]
single
sed
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "Create a script that dumps every PostgreSQL database into its own gzip file under /backup, keeping 14 days." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\ndest=/ba...
script
pg_dump
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Find files in lib larger than +500M." }, { "role": "assistant", "content": "find lib -type f -size +500M" } ]
single
find
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "I need a preflight check that REDIS_URL, DB_PASS and API_KEY exist in the environment." }, { "role": "assistant", "content": "#!/usr/bin/env bas...
script
env
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Show the contents of the include directory sorted by modification time, newest first." }, { "role": "assistant", "content": "ls -lt include" }...
single
ls
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "delete all blank lines from session.txt" }, { "role": "assistant", "content": "sed '/^$/d' session.txt" } ]
single
sed
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Help me total the resident memory of all mysqld processes in MB." }, { "role": "assistant", "content": "ps -C mysqld -o rss= | awk '{s+=$1} END{print ...
pipeline
ps
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Read urls.txt line by line and ping each host once, reporting up or down." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo p...
script
while
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Show the top 5 most frequent values in field 5 of the comma-separated file scheduler.log." }, { "role": "assistant", "content": "cut -d, -f5 sche...
pipeline
cut
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Back up backups to /data/backup as a dated bzip2 archive, pruning all but the last 7 backups." }, { "role": "assistant", "content": "#!/usr/bin/...
script
tar
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "strip leading whitespace from every line of output.yaml and save to clean.txt" }, { "role": "assistant", "content": "sed 's/^[[:space:]]*//' outp...
pipeline
sed
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Find all .js files under docs and delete them. (Careful: destructive.)" }, { "role": "assistant", "content": "find docs -type f -name '*.js' -print0 | xargs -0 rm -...
pipeline
find
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "I need to show the last 50 lines containing '404' in api.log." }, { "role": "assistant", "content": "grep '404' api.log | tail -n 50" } ]
pipeline
grep
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Check whether php-fpm is running and exit 0 if so, 1 otherwise, with a message." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -...
script
if
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "what are the top 200 lines in app.log?" }, { "role": "assistant", "content": "head -n 200 app.log" } ]
single
head
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Recursively set owner and group of modules to postgres:users." }, { "role": "assistant", "content": "sudo chown -R postgres:users modules" } ]
single
chown
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Retry connection to cache.example.com:5432 at most 5 times with a 2-second backoff, failing loudly if it never succeeds." }, { "role": "assistant", "content": "#!/u...
script
bash
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "Write a health check that reports UP/DOWN for the java process via its exit code." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\nproc=java\nif pgrep -x \"$proc\" >...
script
if
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "send a GET request to https://auth.local/api and show the response headers" }, { "role": "assistant", "content": "curl -I https://auth.local/api...
single
curl
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "I need a preflight check that DB_HOST, PORT and ENV exist in the environment." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -e...
script
env
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Delete the first line of product.ini in place." }, { "role": "assistant", "content": "sed -i '1d' product.ini" } ]
single
sed
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Show the listener on port 8000." }, { "role": "assistant", "content": "ss -tlnp sport = :8000" } ]
single
ss
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Archive reports and pipe it over ssh to back it up on a remote host." }, { "role": "assistant", "content": "tar -czf - reports | ssh operator@cdn.exam...
pipeline
tar
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "How many lines in nginx-error.log mention 'unreachable'?" }, { "role": "assistant", "content": "grep -c 'unreachable' nginx-error.log | cat" } ]
pipeline
grep
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Write a health check that reports UP/DOWN for the php-fpm process via its exit code." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -...
script
if
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "download https://monitor.service.io/list.txt and count the lines" }, { "role": "assistant", "content": "curl -s https://monitor.service.io/list.txt | wc -l" } ]
pipeline
curl
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Show the top 15 most frequent values in field 2 of the whitespace-separated file worker.log." }, { "role": "assistant", "content": "awk '{print $2}' worker.log | so...
pipeline
awk
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "change just the group of output.old to mysql" }, { "role": "assistant", "content": "sudo chgrp mysql output.old" } ]
single
chown
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Copy notes.zip into templates only if it's newer than what's there." }, { "role": "assistant", "content": "cp -u notes.zip templates/" } ]
single
cp
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Show me the disk usage of /var/www broken down one level deep." }, { "role": "assistant", "content": "du -h --max-depth=1 /var/www 2>/dev/null | sort -rh" } ]
pipeline
du
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "How many lines in kern.log mention 'traceback'?" }, { "role": "assistant", "content": "grep -c 'traceback' kern.log | cat" } ]
pipeline
grep
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Delete the first line of catalog.tsv in place." }, { "role": "assistant", "content": "sed -i '1d' catalog.tsv" } ]
single
sed
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "Sort catalog.ini and remove duplicate lines." }, { "role": "assistant", "content": "sort -u catalog.ini" } ]
single
sort
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "List all files in project, including hidden ones, in long format." }, { "role": "assistant", "content": "ls -la project" } ]
single
ls
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "Show the top 20 most frequent values in field 9 of the comma-separated file app.log." }, { "role": "assistant", "content": "cut -d, -f9 app.log | sort | uniq -c | sort -nr | head -n 20" } ]
pipeline
cut
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Given invoice.tsv, sort it and drop duplicate lines." }, { "role": "assistant", "content": "cat invoice.tsv | sort -u" } ]
pipeline
sort
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "List all files in /home/alice, including hidden ones, in long format." }, { "role": "assistant", "content": "ls -la /home/alice" } ]
single
ls
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Write a backup script that gzip-compresses /var/www into a timestamped tarball under /data/backup and keeps only the 5 newest." }, { "role": "assistant", "content":...
script
tar
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Print just the PID using port 22." }, { "role": "assistant", "content": "lsof -i :22 -t" } ]
single
lsof
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "I need a retry wrapper around connection to auth.example.org:5432: 4 attempts, 1s apart." }, { "role": "assistant", "content": "#!/usr/bin/env ba...
script
bash
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "extract all the 'name' fields from https://db02.internal/api/users" }, { "role": "assistant", "content": "curl -s https://db02.internal/api/users | jq...
pipeline
curl
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Copy index.py to dist/ but keep the original timestamps and permissions." }, { "role": "assistant", "content": "cp -p index.py dist/" } ]
single
cp
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "Delete invoice.sql but ask for confirmation first." }, { "role": "assistant", "content": "rm -i invoice.sql" } ]
single
rm
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Take changelog.conf and show the last 15 lines." }, { "role": "assistant", "content": "cat changelog.conf | tail -n 15" } ]
pipeline
tail
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Create a script that verifies it is run with at least one argument, else prints usage." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail...
script
if
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Loop through the .md files in backups and moves each file into an archive/ subfolder — write it as a proper script." }, { "role": "assistant", "conten...
script
mv
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "How do I count how many php-fpm processes are running?" }, { "role": "assistant", "content": "pgrep -c php-fpm" } ]
pipeline
pgrep
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Start 'make -j4' with nice value 15 so it doesn't hog the CPU." }, { "role": "assistant", "content": "nice -n 15 make -j4" } ]
single
nice
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Replace every occurrence of 'cookie' with 'cron' in archive.csv and print the result." }, { "role": "assistant", "content": "sed 's/cookie/cron/g' archive.csv" } ...
single
sed
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Rename export.xml to export.xml.old" }, { "role": "assistant", "content": "mv export.xml export.xml.old" } ]
single
mv
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Parse command-line flags -i (input), -d (dir) and -t (tag) using getopts and validate that -i is provided." }, { "role": "assistant", "content": ...
script
getopts
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "Show me how to tally how many times each log level appears in metrics.log." }, { "role": "assistant", "content": "grep -oE '(INFO|WARN|ERROR|DEBUG)' metrics.log | sort | uniq -c | sort -nr" } ]
pipeline
grep
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "Find the running celery processes (excluding the grep itself)." }, { "role": "assistant", "content": "ps aux | grep [c]elery" } ]
pipeline
ps
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "POST a JSON body to https://localhost/api/users" }, { "role": "assistant", "content": "curl -X POST -H 'Content-Type: application/json' -d '{\"na...
single
curl
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Case-insensitively find 'overflow' in access.log." }, { "role": "assistant", "content": "grep -i 'overflow' access.log" } ]
single
grep
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Write a shell script that renames every .txt file in the current directory to .jpg." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -e...
script
for
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "strip leading whitespace from every line of release.yaml and save to clean.txt" }, { "role": "assistant", "content": "sed 's/^[[:space:]]*//' release.yaml > clean.txt" } ]
pipeline
sed
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Clean up logs: remove .cache files not modified in 21 days, recording each deletion." }, { "role": "assistant", "content": "#!/usr/bin/env bash\n...
script
find
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Rank the values of column 1 in dmesg.log by frequency, highest first, top 10 only." }, { "role": "assistant", "content": "awk '{print $1}' dmesg.log | sort | uniq -...
pipeline
awk
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "Process all .tmp files under data with checksum with sha256sum using 4 parallel workers via xargs." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\ndir=data\nfind \"...
script
xargs
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "From audit.txt, strip trailing whitespace." }, { "role": "assistant", "content": "cat audit.txt | sed 's/[[:space:]]*$//'" } ]
pipeline
sed
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Write a shell script that accepts --input (-i), --level (-l) and --dir (-d) via getopts, with a usage message." }, { "role": "assistant", "conte...
script
getopts
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "list only the .xml files in tests" }, { "role": "assistant", "content": "ls tests | grep '\\.xml$'" } ]
pipeline
ls
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Give me a script that iterates over /home/alice/*.jpg and makes a .bak copy of each file." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipef...
script
cp
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Find directories named static anywhere under images." }, { "role": "assistant", "content": "find images -type d -name 'static'" } ]
single
find
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Given config.conf, convert everything to uppercase." }, { "role": "assistant", "content": "cat config.conf | tr 'a-z' 'A-Z'" } ]
pipeline
tr
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "Set results.py to permissions 644." }, { "role": "assistant", "content": "chmod 644 results.py" } ]
single
chmod
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Show the subtree of processes under PID 5925." }, { "role": "assistant", "content": "pstree -p 5925" } ]
single
pstree
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Extract just the email addresses from catalog.tsv." }, { "role": "assistant", "content": "grep -oE '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+' catalog.ts...
pipeline
sed
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "Find the 20 hottest values in column 2 of worker.log (by frequency)." }, { "role": "assistant", "content": "cut -d, -f2 worker.log | sort | uniq -c | sort -nr | head -n 20" } ]
pipeline
cut
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Create the templates directory if needed and then cd into it." }, { "role": "assistant", "content": "mkdir -p templates && cd templates" } ]
pipeline
chain
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Show detailed per-device iostat, 1s apart, 10 times." }, { "role": "assistant", "content": "iostat -x 1 10" } ]
single
iostat
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "delete all blank lines from audit.yaml" }, { "role": "assistant", "content": "sed '/^$/d' audit.yaml" } ]
single
sed
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Write a monitoring script that warns when swap usage exceeds 80%." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\n...
script
free
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Mirror reports to web01.internal:/backup deleting files that no longer exist locally." }, { "role": "assistant", "content": "rsync -avz --delete ...
single
rsync
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Parse command-line flags -l (level), -d (dir) and -p (port) using getopts and validate that -l is provided." }, { "role": "assistant", "content": "#!/usr/bin/env ba...
script
getopts
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "list only the .xml files in /srv/www" }, { "role": "assistant", "content": "ls /srv/www | grep '\\.xml$'" } ]
pipeline
ls
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Show what PID 7749 has open." }, { "role": "assistant", "content": "lsof -p 7749" } ]
single
lsof
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Show established connections on port 6379." }, { "role": "assistant", "content": "lsof -i :6379 -sTCP:ESTABLISHED" } ]
single
lsof
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Find directories named scripts anywhere under include." }, { "role": "assistant", "content": "find include -type d -name 'scripts'" } ]
single
find
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Count total lines across all .xml files in /opt/app." }, { "role": "assistant", "content": "find /opt/app -type f -name '*.xml' -print0 | xargs -0 cat...
pipeline
find
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Follow server.log live as new lines are appended." }, { "role": "assistant", "content": "tail -f server.log" } ]
single
tail
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "gzip every .log file under reports" }, { "role": "assistant", "content": "find reports -type f -name '*.log' -print0 | xargs -0 gzip" } ]
pipeline
find
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Change the owner of summary.zip to dave." }, { "role": "assistant", "content": "sudo chown dave summary.zip" } ]
single
chown
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "replace tabs with commas in test.tsv and write to test.tsv.csv" }, { "role": "assistant", "content": "sed 's/\\t/,/g' test.tsv > test.tsv.csv" ...
pipeline
sed
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Show the last 10 lines containing 'traceback' in gateway.log." }, { "role": "assistant", "content": "grep 'traceback' gateway.log | tail -n 10" } ]
pipeline
grep
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "I need getopts handling for three options: -i, -o and -d; print usage on bad input." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"\"; output=\"\"; dir=\"\...
script
getopts
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "What are the disk usage of logs broken down one level deep?" }, { "role": "assistant", "content": "du -h --max-depth=1 logs 2>/dev/null | sort -r...
pipeline
du
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Fetch JSON from https://app01.internal/api/users and pretty-print it with jq." }, { "role": "assistant", "content": "curl -s https://app01.intern...
pipeline
curl
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Retry connection to cdn.internal:5432 at most 5 times with a 1-second backoff, failing loudly if it never succeeds." }, { "role": "assistant", "c...
script
bash
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Read the CSV transactions.csv field by field (id,name,email) with a while loop and print a greeting." }, { "role": "assistant", "content": "#!/us...
script
while
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Write a script that accepts --port (-p), --input (-i) and --level (-l) via getopts, with a usage message." }, { "role": "assistant", "content": ...
script
getopts
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Show what PID 8327 has open." }, { "role": "assistant", "content": "lsof -p 8327" } ]
single
lsof
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "I need a retry wrapper around connection to github.io:5432: 6 attempts, 2s apart." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\nmax=6\ndelay=2\nfor attempt in $(s...
script
bash
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Print only lines 10 through 20 of config.ini." }, { "role": "assistant", "content": "sed -n '10,20p' config.ini" } ]
single
sed
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "I need per-database MySQL backups written to /var/backups and pruned after 30 days." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\nd...
script
mysqldump
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "change just the group of debug.yaml to users" }, { "role": "assistant", "content": "sudo chgrp users debug.yaml" } ]
single
chown
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Find the 10 most common 'segfault'-related lines in build.log." }, { "role": "assistant", "content": "grep 'segfault' build.log | sort | uniq -c...
pipeline
grep
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Loop over all subdirectories of data and print each one's total size." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\nf...
script
for