{"id":"awkweave-frozen-0001","request":"Using pipe delimiters, count TCP flows and print 0 when none exist.","program":"BEGIN{FS=\"|\"}$4==\"TCP\"{n++}END{print n+0}","input_text":"2026-12-01T10:00:00Z|10.0.0.1|10.0.0.2|TCP|12|1400\n2026-12-01T10:00:01Z|10.0.0.3|10.0.0.2|UDP|4|240\n2026-12-01T10:00:02Z|10.0.0.1|10.0.0.4|TCP|8|900\n2026-12-01T10:00:03Z|10.0.0.2|10.0.0.5|ICMP|1|64\n2026-12-01T10:00:04Z|10.0.0.3|10.0.0.1|UDP|7|630\n","expected_output":"2\n","validation_input":"2026-12-01T11:00:00Z|10.1.0.1|10.1.0.2|TCP|5|500\n2026-12-01T11:00:01Z|10.1.0.4|10.1.0.1|TCP|9|1100\n2026-12-01T11:00:02Z|10.1.0.2|10.1.0.4|UDP|3|180\n2026-12-01T11:00:03Z|10.1.0.4|10.1.0.5|TCP|2|250\n","validation_output":"3\n","family":"flow_tcp_count","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk 'BEGIN {FS=\"|\"} NR>1 {if ($5==\"TCP\") count++} END {print count==0?\"0\":count}' input.txt\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0002","request":"Sum bytes in field 6 of these pipe-delimited flows.","program":"BEGIN{FS=\"|\"}{s+=$6}END{print s+0}","input_text":"2026-12-01T10:00:00Z|10.0.0.1|10.0.0.2|TCP|12|1400\n2026-12-01T10:00:01Z|10.0.0.3|10.0.0.2|UDP|4|240\n2026-12-01T10:00:02Z|10.0.0.1|10.0.0.4|TCP|8|900\n2026-12-01T10:00:03Z|10.0.0.2|10.0.0.5|ICMP|1|64\n2026-12-01T10:00:04Z|10.0.0.3|10.0.0.1|UDP|7|630\n","expected_output":"3234\n","validation_input":"2026-12-01T11:00:00Z|10.1.0.1|10.1.0.2|TCP|5|500\n2026-12-01T11:00:01Z|10.1.0.4|10.1.0.1|TCP|9|1100\n2026-12-01T11:00:02Z|10.1.0.2|10.1.0.4|UDP|3|180\n2026-12-01T11:00:03Z|10.1.0.4|10.1.0.5|TCP|2|250\n","validation_output":"2030\n","family":"flow_bytes_total","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk '{sum += $6} END {print sum}'\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0003","request":"For pipe-delimited flows, total bytes per protocol in first-appearance order.","program":"BEGIN{FS=\"|\"}{if(!($4 in sums))order[++n]=$4;sums[$4]+=$6}END{for(i=1;i<=n;i++)print order[i],sums[order[i]]}","input_text":"2026-12-01T10:00:00Z|10.0.0.1|10.0.0.2|TCP|12|1400\n2026-12-01T10:00:01Z|10.0.0.3|10.0.0.2|UDP|4|240\n2026-12-01T10:00:02Z|10.0.0.1|10.0.0.4|TCP|8|900\n2026-12-01T10:00:03Z|10.0.0.2|10.0.0.5|ICMP|1|64\n2026-12-01T10:00:04Z|10.0.0.3|10.0.0.1|UDP|7|630\n","expected_output":"TCP 2300\nUDP 870\nICMP 64\n","validation_input":"2026-12-01T11:00:00Z|10.1.0.1|10.1.0.2|TCP|5|500\n2026-12-01T11:00:01Z|10.1.0.4|10.1.0.1|TCP|9|1100\n2026-12-01T11:00:02Z|10.1.0.2|10.1.0.4|UDP|3|180\n2026-12-01T11:00:03Z|10.1.0.4|10.1.0.5|TCP|2|250\n","validation_output":"TCP 1850\nUDP 180\n","family":"flow_protocol_bytes","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk '{print $1, $2, $3, $4}' | sort -k 4,4n | uniq -c\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0004","request":"For UDP flows, print average packets to two decimals. Fields are pipe-delimited.","program":"BEGIN{FS=\"|\"}$4==\"UDP\"{s+=$5;n++}END{printf \"%.2f\\n\",s/n}","input_text":"2026-12-01T10:00:00Z|10.0.0.1|10.0.0.2|TCP|12|1400\n2026-12-01T10:00:01Z|10.0.0.3|10.0.0.2|UDP|4|240\n2026-12-01T10:00:02Z|10.0.0.1|10.0.0.4|TCP|8|900\n2026-12-01T10:00:03Z|10.0.0.2|10.0.0.5|ICMP|1|64\n2026-12-01T10:00:04Z|10.0.0.3|10.0.0.1|UDP|7|630\n","expected_output":"5.50\n","validation_input":"2026-12-01T11:00:00Z|10.1.0.1|10.1.0.2|TCP|5|500\n2026-12-01T11:00:01Z|10.1.0.4|10.1.0.1|TCP|9|1100\n2026-12-01T11:00:02Z|10.1.0.2|10.1.0.4|UDP|3|180\n2026-12-01T11:00:03Z|10.1.0.4|10.1.0.5|TCP|2|250\n","validation_output":"3.00\n","family":"flow_udp_average","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk '{print $NF / NR}' FS='|' OFS=' ' input.txt\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0005","request":"Count distinct destination IPs in field 3 of this pipe-delimited data.","program":"BEGIN{FS=\"|\"}{if(!seen[$3]++)n++}END{print n+0}","input_text":"2026-12-01T10:00:00Z|10.0.0.1|10.0.0.2|TCP|12|1400\n2026-12-01T10:00:01Z|10.0.0.3|10.0.0.2|UDP|4|240\n2026-12-01T10:00:02Z|10.0.0.1|10.0.0.4|TCP|8|900\n2026-12-01T10:00:03Z|10.0.0.2|10.0.0.5|ICMP|1|64\n2026-12-01T10:00:04Z|10.0.0.3|10.0.0.1|UDP|7|630\n","expected_output":"4\n","validation_input":"2026-12-01T11:00:00Z|10.1.0.1|10.1.0.2|TCP|5|500\n2026-12-01T11:00:01Z|10.1.0.4|10.1.0.1|TCP|9|1100\n2026-12-01T11:00:02Z|10.1.0.2|10.1.0.4|UDP|3|180\n2026-12-01T11:00:03Z|10.1.0.4|10.1.0.5|TCP|2|250\n","validation_output":"4\n","family":"flow_destination_count","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk '{print $3}' | sort -u | wc -l\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0006","request":"Print the two complete flows with the most bytes, highest first and stable on ties.","program":"BEGIN{FS=\"|\"}{v[NR]=$6+0;line[NR]=$0}END{for(i=2;i<=NR;i++){x=v[i];s=line[i];j=i-1;while(j>=1&&v[j] max_bytes) {\n max_bytes = flow_bytes;\n max_flows = 1;\n } else if (flow_bytes == max_bytes) {\n max_flows++;\n }\n}\nEND {\n for (i = 1; i <= max_flows; i++) {\n print \"Flow \" i \":\";\n for (j = 1; j <= NF; j++) {\n print $j;\n }\n print \"\";\n }\n}'\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 24: unexpected character '''"} {"id":"awkweave-frozen-0007","request":"The CSV has a header. Print sku for products with stock below 5; fields contain no quoted commas.","program":"BEGIN{FS=OFS=\",\"}NR==1{for(i=1;i<=NF;i++)h[$i]=i;next}$h[\"stock\"]<5{print $h[\"sku\"]}","input_text":"sku,category,price,stock\nA1,book,12.50,3\nB2,tool,20.00,0\nC3,book,7.50,8\nD4,tool,15.00,2\nE5,game,30.00,1\n","expected_output":"A1\nB2\nD4\nE5\n","validation_input":"sku,category,price,stock\nF6,game,10.00,4\nG7,book,5.00,0\nH8,tool,25.00,3\nI9,game,8.00,2\n","validation_output":"F6\nG7\nH8\nI9\n","family":"inventory_low_stock","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk 'NR>1 && $4<5 {print $1}' input.csv\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0008","request":"Read stock by its CSV header and print total units in inventory.","program":"BEGIN{FS=OFS=\",\"}NR==1{for(i=1;i<=NF;i++)h[$i]=i;next}{s+=$h[\"stock\"]}END{print s+0}","input_text":"sku,category,price,stock\nA1,book,12.50,3\nB2,tool,20.00,0\nC3,book,7.50,8\nD4,tool,15.00,2\nE5,game,30.00,1\n","expected_output":"14\n","validation_input":"sku,category,price,stock\nF6,game,10.00,4\nG7,book,5.00,0\nH8,tool,25.00,3\nI9,game,8.00,2\n","validation_output":"9\n","family":"inventory_units","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk 'BEGIN { FS=','; sum=0 } NR>1 { if ($1==\"SKU\") continue; sum+=$4 } END { print \"Total units in inventory:\", sum }' input.csv\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0009","request":"Using the CSV header, print the mean price over products to two decimals.","program":"BEGIN{FS=OFS=\",\"}NR==1{for(i=1;i<=NF;i++)h[$i]=i;next}{s+=$h[\"price\"];n++}END{printf \"%.2f\\n\",s/n}","input_text":"sku,category,price,stock\nA1,book,12.50,3\nB2,tool,20.00,0\nC3,book,7.50,8\nD4,tool,15.00,2\nE5,game,30.00,1\n","expected_output":"17.00\n","validation_input":"sku,category,price,stock\nF6,game,10.00,4\nG7,book,5.00,0\nH8,tool,25.00,3\nI9,game,8.00,2\n","validation_output":"12.00\n","family":"inventory_average_price","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk 'BEGIN { FS=','; sum=0; count=0 } NR>1 { sum+=$3; count++ } END { printf \"%.2f\\n\", sum/count }' input.csv\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0010","request":"Count products whose stock field is zero in this simple CSV with a header.","program":"BEGIN{FS=OFS=\",\"}NR==1{for(i=1;i<=NF;i++)h[$i]=i;next}$h[\"stock\"]==0{n++}END{print n+0}","input_text":"sku,category,price,stock\nA1,book,12.50,3\nB2,tool,20.00,0\nC3,book,7.50,8\nD4,tool,15.00,2\nE5,game,30.00,1\n","expected_output":"1\n","validation_input":"sku,category,price,stock\nF6,game,10.00,4\nG7,book,5.00,0\nH8,tool,25.00,3\nI9,game,8.00,2\n","validation_output":"1\n","family":"inventory_out_of_stock","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk 'NR>1 && $4==0 {print $1}' input.csv\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0011","request":"Print each category and its total inventory value (price times stock) to two decimals, in first-appearance order.","program":"BEGIN{FS=OFS=\",\"}NR==1{for(i=1;i<=NF;i++)h[$i]=i;next}{key=$h[\"category\"];if(!(key in sums))order[++n]=key;sums[key]+=$h[\"price\"]*$h[\"stock\"]}END{for(i=1;i<=n;i++)printf \"%s %.2f\\n\",order[i],sums[order[i]]}","input_text":"sku,category,price,stock\nA1,book,12.50,3\nB2,tool,20.00,0\nC3,book,7.50,8\nD4,tool,15.00,2\nE5,game,30.00,1\n","expected_output":"book 97.50\ntool 30.00\ngame 30.00\n","validation_input":"sku,category,price,stock\nF6,game,10.00,4\nG7,book,5.00,0\nH8,tool,25.00,3\nI9,game,8.00,2\n","validation_output":"game 56.00\nbook 0.00\ntool 75.00\n","family":"inventory_category_value","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nBEGIN {\n FS = \",\"\n print \"Category\\tTotal Inventory Value\"\n}\n\n{\n if (!seen[$2]) {\n seen[$2] = 1\n total_value += $3 * $4\n }\n}\n\nEND {\n printf \"%.2f\\n\", total_value\n}\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 17: unexpected character '`'"} {"id":"awkweave-frozen-0012","request":"Skip the CSV header and print the complete product with the highest price, keeping the earliest on ties.","program":"BEGIN{FS=OFS=\",\"}NR==1{for(i=1;i<=NF;i++)h[$i]=i;next}NR==2{best=$h[\"price\"];record=$0}$h[\"price\"]>best{best=$h[\"price\"];record=$0}END{print record}","input_text":"sku,category,price,stock\nA1,book,12.50,3\nB2,tool,20.00,0\nC3,book,7.50,8\nD4,tool,15.00,2\nE5,game,30.00,1\n","expected_output":"E5,game,30.00,1\n","validation_input":"sku,category,price,stock\nF6,game,10.00,4\nG7,book,5.00,0\nH8,tool,25.00,3\nI9,game,8.00,2\n","validation_output":"H8,tool,25.00,3\n","family":"inventory_highest_price","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk 'NR>1 {if ($3 > maxPrice) {maxPrice=$3; maxProduct=$0}} END {print maxProduct}' input.csv\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0013","request":"Count syslog lines containing the exact word Failed.","program":"$0 ~ /Failed/{n++}END{print n+0}","input_text":"Dec 01 10:00:00 web01 sshd[101]: Failed password for invalid user admin\nDec 01 10:00:01 db01 cron[102]: (root) CMD (backup)\nDec 01 10:00:02 web01 sshd[103]: Accepted publickey for alice\nDec 01 10:00:03 cache01 redis[104]: Error allocating buffer\nDec 01 10:00:04 db01 cron[105]: (root) CMD (cleanup)\n","expected_output":"1\n","validation_input":"Dec 02 11:00:00 api01 sshd[201]: Accepted password for bruno\nDec 02 11:00:01 api01 sshd[202]: Failed password for root\nDec 02 11:00:02 job01 cron[203]: (daemon) CMD (index)\nDec 02 11:00:03 api01 nginx[204]: Error connecting upstream\n","validation_output":"1\n","family":"syslog_failed_count","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk '/Failed/ {count++} END {print count}'\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0014","request":"Print hostnames (field 4) for records whose process field begins with sshd.","program":"$5 ~ /^sshd/{print $4}","input_text":"Dec 01 10:00:00 web01 sshd[101]: Failed password for invalid user admin\nDec 01 10:00:01 db01 cron[102]: (root) CMD (backup)\nDec 01 10:00:02 web01 sshd[103]: Accepted publickey for alice\nDec 01 10:00:03 cache01 redis[104]: Error allocating buffer\nDec 01 10:00:04 db01 cron[105]: (root) CMD (cleanup)\n","expected_output":"web01\nweb01\n","validation_input":"Dec 02 11:00:00 api01 sshd[201]: Accepted password for bruno\nDec 02 11:00:01 api01 sshd[202]: Failed password for root\nDec 02 11:00:02 job01 cron[203]: (daemon) CMD (index)\nDec 02 11:00:03 api01 nginx[204]: Error connecting upstream\n","validation_output":"api01\napi01\n","family":"syslog_sshd_hosts","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk '$4 ~ /^sshd/ {print $4}' input.txt\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0015","request":"Print complete syslog records containing error in any letter case.","program":"tolower($0) ~ /error/","input_text":"Dec 01 10:00:00 web01 sshd[101]: Failed password for invalid user admin\nDec 01 10:00:01 db01 cron[102]: (root) CMD (backup)\nDec 01 10:00:02 web01 sshd[103]: Accepted publickey for alice\nDec 01 10:00:03 cache01 redis[104]: Error allocating buffer\nDec 01 10:00:04 db01 cron[105]: (root) CMD (cleanup)\n","expected_output":"Dec 01 10:00:03 cache01 redis[104]: Error allocating buffer\n","validation_input":"Dec 02 11:00:00 api01 sshd[201]: Accepted password for bruno\nDec 02 11:00:01 api01 sshd[202]: Failed password for root\nDec 02 11:00:02 job01 cron[203]: (daemon) CMD (index)\nDec 02 11:00:03 api01 nginx[204]: Error connecting upstream\n","validation_output":"Dec 02 11:00:03 api01 nginx[204]: Error connecting upstream\n","family":"syslog_error_casefold","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk '/error/i'\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'"} {"id":"awkweave-frozen-0016","request":"Extract the process name before [ in field 5 and count records per process in first-appearance order.","program":"{split($5,p,\"[\");if(!(p[1] in counts))order[++n]=p[1];counts[p[1]]++}END{for(i=1;i<=n;i++)print order[i],counts[order[i]]}","input_text":"Dec 01 10:00:00 web01 sshd[101]: Failed password for invalid user admin\nDec 01 10:00:01 db01 cron[102]: (root) CMD (backup)\nDec 01 10:00:02 web01 sshd[103]: Accepted publickey for alice\nDec 01 10:00:03 cache01 redis[104]: Error allocating buffer\nDec 01 10:00:04 db01 cron[105]: (root) CMD (cleanup)\n","expected_output":"sshd 2\ncron 2\nredis 1\n","validation_input":"Dec 02 11:00:00 api01 sshd[201]: Accepted password for bruno\nDec 02 11:00:01 api01 sshd[202]: Failed password for root\nDec 02 11:00:02 job01 cron[203]: (daemon) CMD (index)\nDec 02 11:00:03 api01 nginx[204]: Error connecting upstream\n","validation_output":"sshd 2\ncron 1\nnginx 1\n","family":"syslog_process_counts","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk '{print $5}' | sort -u | awk '{count[$5]++} END {for (process in count) print process, count[process]}'\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0017","request":"For cron records, print month, day, and time (the first three fields).","program":"$5 ~ /^cron/{print $1,$2,$3}","input_text":"Dec 01 10:00:00 web01 sshd[101]: Failed password for invalid user admin\nDec 01 10:00:01 db01 cron[102]: (root) CMD (backup)\nDec 01 10:00:02 web01 sshd[103]: Accepted publickey for alice\nDec 01 10:00:03 cache01 redis[104]: Error allocating buffer\nDec 01 10:00:04 db01 cron[105]: (root) CMD (cleanup)\n","expected_output":"Dec 01 10:00:01\nDec 01 10:00:04\n","validation_input":"Dec 02 11:00:00 api01 sshd[201]: Accepted password for bruno\nDec 02 11:00:01 api01 sshd[202]: Failed password for root\nDec 02 11:00:02 job01 cron[203]: (daemon) CMD (index)\nDec 02 11:00:03 api01 nginx[204]: Error connecting upstream\n","validation_output":"Dec 02 11:00:02\n","family":"syslog_cron_timestamp","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk '{print $1, $2, $3}'\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0018","request":"Count distinct hostnames in field 4 of the syslog input.","program":"{if(!seen[$4]++)n++}END{print n+0}","input_text":"Dec 01 10:00:00 web01 sshd[101]: Failed password for invalid user admin\nDec 01 10:00:01 db01 cron[102]: (root) CMD (backup)\nDec 01 10:00:02 web01 sshd[103]: Accepted publickey for alice\nDec 01 10:00:03 cache01 redis[104]: Error allocating buffer\nDec 01 10:00:04 db01 cron[105]: (root) CMD (cleanup)\n","expected_output":"3\n","validation_input":"Dec 02 11:00:00 api01 sshd[201]: Accepted password for bruno\nDec 02 11:00:01 api01 sshd[202]: Failed password for root\nDec 02 11:00:02 job01 cron[203]: (daemon) CMD (index)\nDec 02 11:00:03 api01 nginx[204]: Error connecting upstream\n","validation_output":"2\n","family":"syslog_unique_hosts","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk '{print $4}' | sort -u | wc -l\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0019","request":"In colon-delimited group data, print group names containing alice as a comma-separated member of field 4.","program":"BEGIN{FS=\":\"}{split($4,members,\",\");for(i in members)if(members[i]==\"alice\")print $1}","input_text":"wheel:x:10:alice,bruno\ndevelopers:x:1000:alice,chen,dina\naudio:x:29:\nusers:x:100:bruno,eli\n","expected_output":"wheel\ndevelopers\n","validation_input":"admins:x:4:farah\ndevelopers:x:1000:farah,gus\nvideo:x:44:gus,hana,ivan\n","validation_output":"","family":"group_membership","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk -F: '$4 ~ /alice/ {print $1}' <<< \"$sample_input\"\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0020","request":"For each colon-delimited group, print its name and number of members; an empty fourth field means zero.","program":"BEGIN{FS=\":\"}{n=split($4,members,\",\");if($4==\"\")n=0;print $1,n}","input_text":"wheel:x:10:alice,bruno\ndevelopers:x:1000:alice,chen,dina\naudio:x:29:\nusers:x:100:bruno,eli\n","expected_output":"wheel 2\ndevelopers 3\naudio 0\nusers 2\n","validation_input":"admins:x:4:farah\ndevelopers:x:1000:farah,gus\nvideo:x:44:gus,hana,ivan\n","validation_output":"admins 1\ndevelopers 2\nvideo 3\n","family":"group_member_counts","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk 'BEGIN {FS=\":\"} {print $1, length($4)}' input.txt\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0021","request":"Print names of colon-delimited groups with numeric GID at least 1000.","program":"BEGIN{FS=\":\"}$3>=1000{print $1}","input_text":"wheel:x:10:alice,bruno\ndevelopers:x:1000:alice,chen,dina\naudio:x:29:\nusers:x:100:bruno,eli\n","expected_output":"developers\n","validation_input":"admins:x:4:farah\ndevelopers:x:1000:farah,gus\nvideo:x:44:gus,hana,ivan\n","validation_output":"developers\n","family":"group_gid_filter","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk -F: '$3 >= 1000 {print $1}' <<< \"$sample_input\"\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0022","request":"For each device in column 1, print its average reading from column 3 to two decimals in first-appearance order.","program":"{if(!($1 in sums))order[++n]=$1;sums[$1]+=$3;counts[$1]++}END{for(i=1;i<=n;i++)printf \"%s %.2f\\n\",order[i],sums[order[i]]/counts[order[i]]}","input_text":"s1 temperature 20.5 C\ns2 humidity 45.0 percent\ns1 temperature 22.0 C\ns3 pressure 101.2 kPa\ns2 humidity 47.5 percent\n","expected_output":"s1 21.25\ns2 46.25\ns3 101.20\n","validation_input":"s4 temperature 18.0 C\ns4 temperature 19.5 C\ns5 humidity 52.0 percent\ns6 pressure 100.8 kPa\n","validation_output":"s4 18.75\ns5 52.00\ns6 100.80\n","family":"sensor_device_average","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk '{if (!seen[$1]) {avg=0; count=0; seen[$1]=1} avg+=$3; count++} END {for (i in seen) printf \"%s %.2f\\n\", i, avg/count}' input.txt\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0023","request":"Print complete readings with value in column 3 greater than 45.","program":"$3>45","input_text":"s1 temperature 20.5 C\ns2 humidity 45.0 percent\ns1 temperature 22.0 C\ns3 pressure 101.2 kPa\ns2 humidity 47.5 percent\n","expected_output":"s3 pressure 101.2 kPa\ns2 humidity 47.5 percent\n","validation_input":"s4 temperature 18.0 C\ns4 temperature 19.5 C\ns5 humidity 52.0 percent\ns6 pressure 100.8 kPa\n","validation_output":"s5 humidity 52.0 percent\ns6 pressure 100.8 kPa\n","family":"sensor_threshold","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk '$3 > 45' input.txt\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'"} {"id":"awkweave-frozen-0024","request":"For each metric in column 2, print its maximum value from column 3 in first-appearance order.","program":"{if(!($2 in seen)){order[++n]=$2;seen[$2]=1;max[$2]=$3}if($3>max[$2])max[$2]=$3}END{for(i=1;i<=n;i++)print order[i],max[order[i]]}","input_text":"s1 temperature 20.5 C\ns2 humidity 45.0 percent\ns1 temperature 22.0 C\ns3 pressure 101.2 kPa\ns2 humidity 47.5 percent\n","expected_output":"temperature 22.0\nhumidity 47.5\npressure 101.2\n","validation_input":"s4 temperature 18.0 C\ns4 temperature 19.5 C\ns5 humidity 52.0 percent\ns6 pressure 100.8 kPa\n","validation_output":"temperature 19.5\nhumidity 52.0\npressure 100.8\n","family":"sensor_metric_max","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk '{if ($2 == prev) max = max > $3 ? max : $3; else {print prev \" \" max; prev = $2; max = $3}} END {print prev \" \" max}' input.txt\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0025","request":"Count distinct device identifiers in column 1.","program":"{if(!seen[$1]++)n++}END{print n+0}","input_text":"s1 temperature 20.5 C\ns2 humidity 45.0 percent\ns1 temperature 22.0 C\ns3 pressure 101.2 kPa\ns2 humidity 47.5 percent\n","expected_output":"3\n","validation_input":"s4 temperature 18.0 C\ns4 temperature 19.5 C\ns5 humidity 52.0 percent\ns6 pressure 100.8 kPa\n","validation_output":"3\n","family":"sensor_device_count","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk '{print $1}' | sort -u | wc -l\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0026","request":"Print device and value for readings whose unit in column 4 is C.","program":"$4==\"C\"{print $1,$3}","input_text":"s1 temperature 20.5 C\ns2 humidity 45.0 percent\ns1 temperature 22.0 C\ns3 pressure 101.2 kPa\ns2 humidity 47.5 percent\n","expected_output":"s1 20.5\ns1 22.0\n","validation_input":"s4 temperature 18.0 C\ns4 temperature 19.5 C\ns5 humidity 52.0 percent\ns6 pressure 100.8 kPa\n","validation_output":"s4 18.0\ns4 19.5\n","family":"sensor_unit_filter","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk '$4 == \"C\" {print $1, $2}' input.txt\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0027","request":"Convert tab-separated rows to comma-separated rows while preserving all fields.","program":"BEGIN{FS=\"\\t\";OFS=\",\"}{$1=$1;print}","input_text":"a\t1\tx\nb\t2\ty\n","expected_output":"a,1,x\nb,2,y\n","validation_input":"c\t3\tz\nd\t4\tw\n","validation_output":"c,3,z\nd,4,w\n","family":"tsv_to_csv","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk '{print $1 \",\" $2 \",\" $3}' input.txt\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0028","request":"For each record, print column 1 and the running mean of column 3 to two decimals.","program":"{s+=$3;n++;printf \"%s %.2f\\n\",$1,s/n}","input_text":"s1 temperature 20.5 C\ns2 humidity 45.0 percent\ns1 temperature 22.0 C\ns3 pressure 101.2 kPa\ns2 humidity 47.5 percent\n","expected_output":"s1 20.50\ns2 32.75\ns1 29.17\ns3 47.17\ns2 47.24\n","validation_input":"s4 temperature 18.0 C\ns4 temperature 19.5 C\ns5 humidity 52.0 percent\ns6 pressure 100.8 kPa\n","validation_output":"s4 18.00\ns4 18.75\ns5 29.83\ns6 47.58\n","family":"running_average","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk '{sum += $3; count++} END {print $1, sum/count}' input.txt\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0029","request":"Print the median of column 3; for an even number of records use the lower middle value.","program":"{v[NR]=$3+0}END{for(i=2;i<=NR;i++){x=v[i];j=i-1;while(j>=1&&v[j]>x){v[j+1]=v[j];j--}v[j+1]=x}print v[int((NR+1)/2)]}","input_text":"s1 temperature 20.5 C\ns2 humidity 45.0 percent\ns1 temperature 22.0 C\ns3 pressure 101.2 kPa\ns2 humidity 47.5 percent\n","expected_output":"45\n","validation_input":"s4 temperature 18.0 C\ns4 temperature 19.5 C\ns5 humidity 52.0 percent\ns6 pressure 100.8 kPa\n","validation_output":"19.5\n","family":"median_value","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk 'BEGIN {FS=\" \"}; NR%2==0 {print $3} else {print ($3+$4)/2}' input.txt\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: line 2: syntax error at or near else\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0030","request":"Remove blank lines and lines whose first non-whitespace character is #.","program":"$0 ~ /[^[:space:]]/ && $0 !~ /^[[:space:]]*#/","input_text":"# comment\na 1\n\n # another\nb 2\n","expected_output":"a 1\nb 2\n","validation_input":"c 3\n# note\n\nd 4\n","validation_output":"c 3\nd 4\n","family":"comment_filter","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk '!/^#/ && NF' input.txt\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'"} {"id":"awkweave-frozen-0031","request":"Count lines whose first non-whitespace character is #, excluding blank lines.","program":"$0 ~ /^[[:space:]]*#/{n++}END{print n+0}","input_text":"# comment\na 1\n\n # another\nb 2\n","expected_output":"2\n","validation_input":"c 3\n# note\n\nd 4\n","validation_output":"1\n","family":"comment_count","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk '/^#/ && !/^$/ {print NR}' input.txt\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0032","request":"Trim leading and trailing whitespace from each line without altering internal spacing.","program":"{gsub(/^[[:space:]]+|[[:space:]]+$/,\"\",$0);print}","input_text":" a 1 \n\tb 2\t\n","expected_output":"a 1\nb 2\n","validation_input":" c 3 \n d 4 \n","validation_output":"c 3\nd 4\n","family":"trim_lines","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk '{gsub(/^\\s+|\\s+$/, \"\"); print}' <<< \" a 1 \\n b 2\"\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0033","request":"For ISO timestamps in field 1, print year, month, and day separated by hyphens.","program":"BEGIN{OFS=\"-\"}{split($1,date,\"-\");split(date[3],parts,\"T\");print date[1],date[2],parts[1]}","input_text":"2026-12-01T10:00:00Z|10.0.0.1|10.0.0.2|TCP|12|1400\n2026-12-01T10:00:01Z|10.0.0.3|10.0.0.2|UDP|4|240\n2026-12-01T10:00:02Z|10.0.0.1|10.0.0.4|TCP|8|900\n2026-12-01T10:00:03Z|10.0.0.2|10.0.0.5|ICMP|1|64\n2026-12-01T10:00:04Z|10.0.0.3|10.0.0.1|UDP|7|630\n","expected_output":"2026-12-01\n2026-12-01\n2026-12-01\n2026-12-01\n2026-12-01\n","validation_input":"2026-12-01T11:00:00Z|10.1.0.1|10.1.0.2|TCP|5|500\n2026-12-01T11:00:01Z|10.1.0.4|10.1.0.1|TCP|9|1100\n2026-12-01T11:00:02Z|10.1.0.2|10.1.0.4|UDP|3|180\n2026-12-01T11:00:03Z|10.1.0.4|10.1.0.5|TCP|2|250\n","validation_output":"2026-12-01\n2026-12-01\n2026-12-01\n2026-12-01\n","family":"iso_date_parts","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk '{print $1 | \"date -d \\\"\"$1\"\\\" +%Y-%m-%d\"}'\n```","valid":false,"correct":false,"error":"Output redirection and pipes are not allowed."} {"id":"awkweave-frozen-0034","request":"Print complete records sorted by column 3 ascending, preserving input order on ties.","program":"{v[NR]=$3+0;line[NR]=$0}END{for(i=2;i<=NR;i++){x=v[i];s=line[i];j=i-1;while(j>=1&&v[j]>x){v[j+1]=v[j];line[j+1]=line[j];j--}v[j+1]=x;line[j+1]=s}for(i=1;i<=NR;i++)print line[i]}","input_text":"s1 temperature 20.5 C\ns2 humidity 45.0 percent\ns1 temperature 22.0 C\ns3 pressure 101.2 kPa\ns2 humidity 47.5 percent\n","expected_output":"s1 temperature 20.5 C\ns1 temperature 22.0 C\ns2 humidity 45.0 percent\ns2 humidity 47.5 percent\ns3 pressure 101.2 kPa\n","validation_input":"s4 temperature 18.0 C\ns4 temperature 19.5 C\ns5 humidity 52.0 percent\ns6 pressure 100.8 kPa\n","validation_output":"s4 temperature 18.0 C\ns4 temperature 19.5 C\ns5 humidity 52.0 percent\ns6 pressure 100.8 kPa\n","family":"sort_numeric_ascending","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nBEGIN {\n FS = \" \"\n}\nNR > 1 {\n arr[NR] = $0\n}\nEND {\n for (i in arr) {\n print arr[i]\n }\n asort(arr)\n for (i in arr) {\n print arr[i]\n }\n}\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 17: unexpected character '`'"} {"id":"awkweave-frozen-0035","request":"Sum column 3 only for temperature records, printing 0 when no such records exist.","program":"$2==\"temperature\"{s+=$3}END{print s+0}","input_text":"s1 temperature 20.5 C\ns2 humidity 45.0 percent\ns1 temperature 22.0 C\ns3 pressure 101.2 kPa\ns2 humidity 47.5 percent\n","expected_output":"42.5\n","validation_input":"s4 temperature 18.0 C\ns4 temperature 19.5 C\ns5 humidity 52.0 percent\ns6 pressure 100.8 kPa\n","validation_output":"37.5\n","family":"sum_if_metric","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nBEGIN {\n sum = 0;\n}\n{\n if ($1 == \"temperature\") {\n sum += $3;\n }\n}\nEND {\n print sum ? sum : 0;\n}\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 13: unexpected character '`'"} {"id":"awkweave-frozen-0036","request":"Print only the first complete record for each device in column 1.","program":"!seen[$1]++","input_text":"s1 temperature 20.5 C\ns2 humidity 45.0 percent\ns1 temperature 22.0 C\ns3 pressure 101.2 kPa\ns2 humidity 47.5 percent\n","expected_output":"s1 temperature 20.5 C\ns2 humidity 45.0 percent\ns3 pressure 101.2 kPa\n","validation_input":"s4 temperature 18.0 C\ns4 temperature 19.5 C\ns5 humidity 52.0 percent\ns6 pressure 100.8 kPa\n","validation_output":"s4 temperature 18.0 C\ns5 humidity 52.0 percent\ns6 pressure 100.8 kPa\n","family":"first_record_per_device","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk '{if (NR==1 || $1!=prev_device) print; prev_device=$1}' input.txt\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"} {"id":"awkweave-frozen-0037","request":"Count records per unit in column 4 in first-appearance order.","program":"{if(!($4 in counts))order[++n]=$4;counts[$4]++}END{for(i=1;i<=n;i++)print order[i],counts[order[i]]}","input_text":"s1 temperature 20.5 C\ns2 humidity 45.0 percent\ns1 temperature 22.0 C\ns3 pressure 101.2 kPa\ns2 humidity 47.5 percent\n","expected_output":"C 2\npercent 2\nkPa 1\n","validation_input":"s4 temperature 18.0 C\ns4 temperature 19.5 C\ns5 humidity 52.0 percent\ns6 pressure 100.8 kPa\n","validation_output":"C 2\npercent 1\nkPa 1\n","family":"count_units","difficulty":3,"split":"frozen_test","source":"original-frozen-hand-authored","license":"CC-BY-4.0","prediction":"```\nawk 'BEGIN {FS=\" \"}; {if (NR==1) print $4; else if ($4!=prev) print $4} {prev=$4}' input.txt\n```","valid":false,"correct":false,"error":"awk: 1: unexpected character '`'\nawk: 2: unexpected character '''"}