messages
listlengths
2
2
[ { "role": "user", "content": "Write a bash script to find all *.sql files in '/opt/analytics' modified more than 14 days ago, archive them into '/backups/opt_analytics_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant...
[ { "role": "user", "content": "Write a bash script to find all *.tar.gz files in '/var/log' modified more than 60 days ago, archive them into '/backups/var_log_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "c...
[ { "role": "user", "content": "Write a bash script to find all *.txt files in '/data/exports' modified more than 14 days ago, archive them into '/backups/data_exports_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant",...
[ { "role": "user", "content": "Write a bash script to find all *.bak files in '/opt/analytics' modified more than 60 days ago, archive them into '/backups/opt_analytics_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant...
[ { "role": "user", "content": "Write an Alpine-compatible POSIX /bin/sh entrypoint script for a container that probes OpenSearch engine at host '${TARGET_HOST:-opensearch}' on port 9200. Wait up to 30 attempts before aborting, and execute CMD upon success." }, { "role": "assistant", "content": "#...
[ { "role": "user", "content": "Write a bash script to find all *.json files in '/opt/app' modified more than 14 days ago, archive them into '/backups/opt_app_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "con...
[ { "role": "user", "content": "Write a bash script to find all *.bak files in '/srv/backups' modified more than 30 days ago, archive them into '/backups/srv_backups_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", ...
[ { "role": "user", "content": "Write a bash script to find all *.json files in '/srv/backups' modified more than 45 days ago, archive them into '/backups/srv_backups_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", ...
[ { "role": "user", "content": "Write a bash script to find all *.parquet files in '/etc/ssl' modified more than 365 days ago, archive them into '/backups/etc_ssl_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", ...
[ { "role": "user", "content": "Write a bash script to find all *.txt files in '/srv/backups' modified more than 30 days ago, archive them into '/backups/srv_backups_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", ...
[ { "role": "user", "content": "Write a bash script to find all *.bak files in '/home/app/storage' modified more than 7 days ago, archive them into '/backups/home_app_storage_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assi...
[ { "role": "user", "content": "Write a bash script to find all *.parquet files in '/home/app/storage' modified more than 14 days ago, archive them into '/backups/home_app_storage_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": ...
[ { "role": "user", "content": "Write a bash script to find all *.sql files in '/srv/backups' modified more than 21 days ago, archive them into '/backups/srv_backups_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", ...
[ { "role": "user", "content": "Write a bash script using awk to analyze CSV financial transaction report from file 'transactions.csv'. Goal: Transactions exceeding $1000 grouped by merchant. Sort results using 'sort -k2 -nr'." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pi...
[ { "role": "user", "content": "Write an Alpine-compatible POSIX /bin/sh entrypoint script for a container that probes Elasticsearch cluster at host '${TARGET_HOST:-elasticsearch}' on port 9200. Wait up to 10 attempts before aborting, and execute CMD upon success." }, { "role": "assistant", "conte...
[ { "role": "user", "content": "Write a bash script to find all *.parquet files in '/var/log' modified more than 7 days ago, archive them into '/backups/var_log_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "c...
[ { "role": "user", "content": "Write a bash script to find all *.dump files in '/data/metrics' modified more than 60 days ago, archive them into '/backups/data_metrics_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant"...
[ { "role": "user", "content": "Write a bash script to find all *.txt files in '/var/www' modified more than 365 days ago, archive them into '/backups/var_www_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "con...
[ { "role": "user", "content": "Write an Alpine-compatible POSIX /bin/sh entrypoint script for a container that probes Memcached daemon at host '${TARGET_HOST:-memcached}' on port 11211. Wait up to 45 attempts before aborting, and execute CMD upon success." }, { "role": "assistant", "content": "#!...
[ { "role": "user", "content": "Write a bash script to find all *.json files in '/etc/ssl' modified more than 120 days ago, archive them into '/backups/etc_ssl_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "co...
[ { "role": "user", "content": "Write a bash script to find all *.tsv files in '/data/metrics' modified more than 21 days ago, archive them into '/backups/data_metrics_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant",...
[ { "role": "user", "content": "Write a bash script to find all *.parquet files in '/var/audit' modified more than 120 days ago, archive them into '/backups/var_audit_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", ...
[ { "role": "user", "content": "Fix the vulnerabilities and ShellCheck errors in this script:\n\n```bash\nfind /data -name '*.old' -exec rm {} \\;\n```" }, { "role": "assistant", "content": "### Vulnerability Analysis:\nSpawns a separate rm process for every single file; fails on filenames with sp...
[ { "role": "user", "content": "Write a bash script using jq to group array of tickets by '.status' and output count per status from 'tickets.json'. Output results cleanly to stdout with strict exit code handling." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\n\nINP...
[ { "role": "user", "content": "Write a bash script that uses flock to prevent concurrent executions of task 'daily_cleanup' with a 60-second lock acquisition timeout." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\n\nLOCK_FILE=\"/var/lock/daily_cleanup.lock\"\nTIMEO...
[ { "role": "user", "content": "Write a bash script to find all *.csv files in '/opt/app' modified more than 21 days ago, archive them into '/backups/opt_app_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "cont...
[ { "role": "user", "content": "Write a minimal POSIX /bin/sh one-liner script to test if localhost port 8018 is accepting TCP connections, printing UP or DOWN and exiting with 0 or 1." }, { "role": "assistant", "content": "#!/bin/sh\nset -eu\n\nif nc -z 127.0.0.1 8018 >/dev/null 2>&1; then\n p...
[ { "role": "user", "content": "Review this snippet and provide a hardened, secure alternative:\n\n```bash\ncat file.txt | grep error | wc -l\n```" }, { "role": "assistant", "content": "### Vulnerability Analysis:\nSC2002: Useless use of cat; unhandled exit status if grep finds zero matches under ...
[ { "role": "user", "content": "Write a bash script to find all *.parquet files in '/etc/ssl' modified more than 60 days ago, archive them into '/backups/etc_ssl_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "...
[ { "role": "user", "content": "Write a bash script using awk to analyze Docker stats stream output from file 'docker_stats.txt'. Goal: Calculate total memory consumption across containers. Sort results using 'head -n 10'." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefa...
[ { "role": "user", "content": "Write a bash script to find all *.json files in '/etc/ssl' modified more than 14 days ago, archive them into '/backups/etc_ssl_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "con...
[ { "role": "user", "content": "Write a bash script to find all *.tar.gz files in '/data/exports' modified more than 45 days ago, archive them into '/backups/data_exports_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistan...
[ { "role": "user", "content": "Write a bash script to find all *.parquet files in '/data/exports' modified more than 90 days ago, archive them into '/backups/data_exports_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assista...
[ { "role": "user", "content": "Write a bash script to find all *.log files in '/var/www' modified more than 7 days ago, archive them into '/backups/var_www_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "conte...
[ { "role": "user", "content": "Write an Alpine-compatible POSIX /bin/sh entrypoint script for a container that probes ZooKeeper coordinator at host '${TARGET_HOST:-zookeeper}' on port 2181. Wait up to 45 attempts before aborting, and execute CMD upon success." }, { "role": "assistant", "content":...
[ { "role": "user", "content": "Write a bash script to find all *.dump files in '/var/audit' modified more than 30 days ago, archive them into '/backups/var_audit_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", ...
[ { "role": "user", "content": "Write a bash script to find all *.tar.gz files in '/home/app/storage' modified more than 14 days ago, archive them into '/backups/home_app_storage_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "...
[ { "role": "user", "content": "Write a bash script to find all *.csv files in '/var/log' modified more than 14 days ago, archive them into '/backups/var_log_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "cont...
[ { "role": "user", "content": "Write a bash script to find all *.bak files in '/etc/ssl' modified more than 180 days ago, archive them into '/backups/etc_ssl_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "con...
[ { "role": "user", "content": "Write a bash script to find all *.tsv files in '/data/exports' modified more than 120 days ago, archive them into '/backups/data_exports_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant"...
[ { "role": "user", "content": "Write a bash script to find all *.dump files in '/home/app/storage' modified more than 120 days ago, archive them into '/backups/home_app_storage_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "a...
[ { "role": "user", "content": "Write a bash script to find all *.dump files in '/opt/app' modified more than 365 days ago, archive them into '/backups/opt_app_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "co...
[ { "role": "user", "content": "Write a bash script that uses flock to prevent concurrent executions of task 'cache_warmup' with a 60-second lock acquisition timeout." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\n\nLOCK_FILE=\"/var/lock/cache_warmup.lock\"\nTIMEOUT...
[ { "role": "user", "content": "Write a bash script to find all *.bak files in '/var/log' modified more than 90 days ago, archive them into '/backups/var_log_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "cont...
[ { "role": "user", "content": "Write a bash script to find all *.csv files in '/srv/backups' modified more than 180 days ago, archive them into '/backups/srv_backups_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", ...
[ { "role": "user", "content": "Write a bash script to find all *.dump files in '/var/log' modified more than 120 days ago, archive them into '/backups/var_log_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "co...
[ { "role": "user", "content": "Write a bash script to find all *.dump files in '/home/app/storage' modified more than 14 days ago, archive them into '/backups/home_app_storage_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "as...
[ { "role": "user", "content": "Write a bash script to find all *.dump files in '/var/log' modified more than 60 days ago, archive them into '/backups/var_log_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "con...
[ { "role": "user", "content": "Write a bash script using jq to extract and sort field 'item_20' from array '.records' in 'data_20.json' safely." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\n\nDATA_FILE=\"data_20.json\"\n[[ -r \"${DATA_FILE}\" ]] || { echo \"[ERROR...
[ { "role": "user", "content": "Write a bash script to find all *.sql files in '/var/audit' modified more than 60 days ago, archive them into '/backups/var_audit_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "...
[ { "role": "user", "content": "Write a bash script to find all *.txt files in '/opt/app' modified more than 21 days ago, archive them into '/backups/opt_app_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "cont...
[ { "role": "user", "content": "Write a bash script to find all *.log files in '/var/audit' modified more than 60 days ago, archive them into '/backups/var_audit_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "...
[ { "role": "user", "content": "Write a bash script to find all *.bak files in '/var/www' modified more than 7 days ago, archive them into '/backups/var_www_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "conte...
[ { "role": "user", "content": "Write a bash script to find all *.sql files in '/opt/analytics' modified more than 30 days ago, archive them into '/backups/opt_analytics_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant...
[ { "role": "user", "content": "Write a bash script to find all *.parquet files in '/data/metrics' modified more than 45 days ago, archive them into '/backups/data_metrics_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assista...
[ { "role": "user", "content": "Write a bash script to find all *.txt files in '/opt/analytics' modified more than 45 days ago, archive them into '/backups/opt_analytics_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant...
[ { "role": "user", "content": "Write a bash script to find all *.parquet files in '/srv/backups' modified more than 180 days ago, archive them into '/backups/srv_backups_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistan...
[ { "role": "user", "content": "Write a bash script to find all *.parquet files in '/var/www' modified more than 21 days ago, archive them into '/backups/var_www_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "...
[ { "role": "user", "content": "Write a bash script to find all *.tar.gz files in '/data/metrics' modified more than 14 days ago, archive them into '/backups/data_metrics_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistan...
[ { "role": "user", "content": "Write a bash script to find all *.sql files in '/data/metrics' modified more than 180 days ago, archive them into '/backups/data_metrics_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant"...
[ { "role": "user", "content": "Write a bash script to find all *.log files in '/opt/analytics' modified more than 180 days ago, archive them into '/backups/opt_analytics_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistan...
[ { "role": "user", "content": "Write a minimal POSIX /bin/sh one-liner script to test if localhost port 8006 is accepting TCP connections, printing UP or DOWN and exiting with 0 or 1." }, { "role": "assistant", "content": "#!/bin/sh\nset -eu\n\nif nc -z 127.0.0.1 8006 >/dev/null 2>&1; then\n p...
[ { "role": "user", "content": "Write a bash script to find all *.txt files in '/etc/ssl' modified more than 60 days ago, archive them into '/backups/etc_ssl_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "cont...
[ { "role": "user", "content": "Write a bash script to find all *.tar.gz files in '/data/metrics' modified more than 90 days ago, archive them into '/backups/data_metrics_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistan...
[ { "role": "user", "content": "Write a bash script to find all *.tar.gz files in '/opt/analytics' modified more than 30 days ago, archive them into '/backups/opt_analytics_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assist...
[ { "role": "user", "content": "Write a bash script to find all *.json files in '/var/audit' modified more than 120 days ago, archive them into '/backups/var_audit_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", ...
[ { "role": "user", "content": "Write a bash script to find all *.csv files in '/data/exports' modified more than 60 days ago, archive them into '/backups/data_exports_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant",...
[ { "role": "user", "content": "Write a bash script to find all *.dump files in '/home/app/storage' modified more than 7 days ago, archive them into '/backups/home_app_storage_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "ass...
[ { "role": "user", "content": "Write a bash script to find all *.json files in '/home/app/storage' modified more than 45 days ago, archive them into '/backups/home_app_storage_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "as...
[ { "role": "user", "content": "Write a bash script to find all *.txt files in '/data/metrics' modified more than 365 days ago, archive them into '/backups/data_metrics_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant"...
[ { "role": "user", "content": "Write an Alpine-compatible POSIX /bin/sh entrypoint script for a container that probes Apache Kafka broker at host '${TARGET_HOST:-kafka}' on port 9092. Wait up to 25 attempts before aborting, and execute CMD upon success." }, { "role": "assistant", "content": "#!/b...
[ { "role": "user", "content": "Write a bash script to find all *.tsv files in '/opt/analytics' modified more than 180 days ago, archive them into '/backups/opt_analytics_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistan...
[ { "role": "user", "content": "Write a bash script to find all *.tsv files in '/srv/backups' modified more than 60 days ago, archive them into '/backups/srv_backups_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", ...
[ { "role": "user", "content": "Write an Alpine-compatible POSIX /bin/sh entrypoint script for a container that probes ZooKeeper coordinator at host '${TARGET_HOST:-zookeeper}' on port 2181. Wait up to 30 attempts before aborting, and execute CMD upon success." }, { "role": "assistant", "content":...
[ { "role": "user", "content": "Write a bash script to find all *.tar.gz files in '/opt/app' modified more than 45 days ago, archive them into '/backups/opt_app_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "c...
[ { "role": "user", "content": "Write a bash script to find all *.log files in '/var/www' modified more than 120 days ago, archive them into '/backups/var_www_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "con...
[ { "role": "user", "content": "Write a bash script to find all *.json files in '/var/log' modified more than 60 days ago, archive them into '/backups/var_log_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "con...
[ { "role": "user", "content": "Write a bash script to find all *.txt files in '/srv/backups' modified more than 365 days ago, archive them into '/backups/srv_backups_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", ...
[ { "role": "user", "content": "Write a bash script to find all *.log files in '/var/log' modified more than 21 days ago, archive them into '/backups/var_log_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "cont...
[ { "role": "user", "content": "Write a bash script using jq to validate whether JSON file conforms to having non-empty array '.data' and exit 1 if false from 'payload.json'. Use an atomic write pattern with mktemp so the file is safely updated in place." }, { "role": "assistant", "content": "#!/u...
[ { "role": "user", "content": "Write a bash script using jq to increment numeric counter '.visits' by 1 and update timestamp '.updated_at' from 'stats.json'. Use an atomic write pattern with mktemp so the file is safely updated in place." }, { "role": "assistant", "content": "#!/usr/bin/env bash\...
[ { "role": "user", "content": "Write a bash script to find all *.bak files in '/data/metrics' modified more than 30 days ago, archive them into '/backups/data_metrics_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant",...
[ { "role": "user", "content": "Write a bash script to find all *.tsv files in '/opt/app' modified more than 365 days ago, archive them into '/backups/opt_app_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "con...
[ { "role": "user", "content": "Write a bash script to find all *.tar.gz files in '/var/audit' modified more than 21 days ago, archive them into '/backups/var_audit_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", ...
[ { "role": "user", "content": "Write a bash script to find all *.csv files in '/home/app/storage' modified more than 30 days ago, archive them into '/backups/home_app_storage_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "ass...
[ { "role": "user", "content": "Write a bash script to find all *.bak files in '/data/exports' modified more than 120 days ago, archive them into '/backups/data_exports_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant"...
[ { "role": "user", "content": "Write an Alpine-compatible POSIX /bin/sh entrypoint script for a container that probes MySQL database at host '${TARGET_HOST:-mysql}' on port 3306. Wait up to 15 attempts before aborting, and execute CMD upon success." }, { "role": "assistant", "content": "#!/bin/sh...
[ { "role": "user", "content": "Write a minimal POSIX /bin/sh one-liner script to test if localhost port 8001 is accepting TCP connections, printing UP or DOWN and exiting with 0 or 1." }, { "role": "assistant", "content": "#!/bin/sh\nset -eu\n\nif nc -z 127.0.0.1 8001 >/dev/null 2>&1; then\n p...
[ { "role": "user", "content": "Write a bash script to find all *.sql files in '/var/log' modified more than 365 days ago, archive them into '/backups/var_log_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "con...
[ { "role": "user", "content": "Write a bash script to find all *.sql files in '/var/www' modified more than 30 days ago, archive them into '/backups/var_www_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "cont...
[ { "role": "user", "content": "Write an Alpine-compatible POSIX /bin/sh entrypoint script for a container that probes Consul service discovery at host '${TARGET_HOST:-consul}' on port 8500. Wait up to 15 attempts before aborting, and execute CMD upon success." }, { "role": "assistant", "content":...
[ { "role": "user", "content": "Write a bash script to find all *.json files in '/var/www' modified more than 21 days ago, archive them into '/backups/var_www_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "con...
[ { "role": "user", "content": "Write a bash script to find all *.tar.gz files in '/data/metrics' modified more than 60 days ago, archive them into '/backups/data_metrics_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistan...
[ { "role": "user", "content": "Write a bash script to find all *.log files in '/data/metrics' modified more than 7 days ago, archive them into '/backups/data_metrics_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", ...
[ { "role": "user", "content": "Write a bash script using jq to extract and sort field 'item_16' from array '.records' in 'data_16.json' safely." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\n\nDATA_FILE=\"data_16.json\"\n[[ -r \"${DATA_FILE}\" ]] || { echo \"[ERROR...
[ { "role": "user", "content": "Write a bash script to find all *.txt files in '/var/www' modified more than 21 days ago, archive them into '/backups/var_www_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "cont...
[ { "role": "user", "content": "Write a bash script to find all *.sql files in '/opt/app' modified more than 14 days ago, archive them into '/backups/opt_app_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "cont...
[ { "role": "user", "content": "Write an Alpine-compatible POSIX /bin/sh entrypoint script for a container that probes Redis cache at host '${TARGET_HOST:-redis}' on port 6379. Wait up to 20 attempts before aborting, and execute CMD upon success." }, { "role": "assistant", "content": "#!/bin/sh\ns...
[ { "role": "user", "content": "Write a bash script to find all *.sql files in '/var/log' modified more than 45 days ago, archive them into '/backups/var_log_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "cont...
[ { "role": "user", "content": "Write a bash script to find all *.dump files in '/var/log' modified more than 90 days ago, archive them into '/backups/var_log_archive_$(date +%Y%m%d).tar.gz', verify the archive, and delete original files safely with dry-run support." }, { "role": "assistant", "con...