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... |
End of preview. Expand in Data Studio
Full-Spectrum Shell Script Specialist Dataset
This dataset contains 1,000 curated, unique ChatML conversation records engineered to fine-tune a specialist language model for Production-Grade Shell Scripting (Bash 5+, POSIX /bin/sh, jq, awk, sed).
It was used to train the rajivmehtapy/gemma-4-e4b-shell-specialist model using Unsloth.
Dataset Splits
| Split | File | Records | Description |
|---|---|---|---|
| train | train.jsonl |
900 | Core training set across all 4 production modules |
| validation | eval.jsonl |
100 | Held-out validation split for checkpoint evaluation |
Modules Covered
- Production Bash 5+ Automation (35%): Archival rotations, health probes with exponential backoff, systemd service watchdogs, disk/memory threshold monitors.
- Minimal POSIX
/bin/shPortability (20%): Alpine Linux / Docker entrypoints, socket polling (nc -z), POSIX parameter expansions, zero Bashisms. - Advanced CLI Stream Wrangling (25%): Complex
jqqueries with atomic file replacements,awkcolumnar parsing,sedstream updates, null-delimitedfind/xargspipelines. - Defensive Hardening & Bug Refactoring (20%): Auditing fragile bash snippets, eliminating unquoted variable risks, adding
set -euo pipefailandtraphandlers.
Data Schema (ChatML JSONL)
{
"messages": [
{
"role": "user",
"content": "Write a bash script to archive and remove .log files older than 14 days in /var/log with dry-run support."
},
{
"role": "assistant",
"content": "#!/usr/bin/env bash\nset -euo pipefail\n\nDRY_RUN=false\n[[ \"${1:-}\" == \"--dry-run\" ]] && DRY_RUN=true\n..."
}
]
}
Usage with Hugging Face Datasets
from datasets import load_dataset
dataset = load_dataset("rajivmehtapy/shell-script-specialist-dataset")
print(dataset)
print(dataset["train"][0])
Next Steps: DPO & GRPO Alignment
When you spin up your next machine for DPO and GRPO, you can immediately resume using the following one-liners:
1. Pulling the Policy Model on the New Machine
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="rajivmehtapy/gemma-4-e4b-shell-specialist",
max_seq_length=1024,
load_in_4bit=True,
)
2. Pulling the Dataset on the New Machine
from datasets import load_dataset
dataset = load_dataset("rajivmehtapy/shell-script-specialist-dataset")
3. Ready for DPO
- Use the SFT model as the reference policy.
- Provide
(prompt, chosen, rejected)triplets (wherechosencontains defensive standards likeset -euo pipefailandrejectedcontains common bash antipatterns). - Train with
trl.DPOTrainer.
4. Ready for GRPO
- Use the SFT model as the actor model.
- Set up automated rule-based reward functions (
shellcheckreturncode, exit code in Docker sandbox, security parameter validation). - Train with
trl.GRPOTrainer.
Everything is backed up and ready for your next phase!
- Downloads last month
- 50