{
 "arm": "W-gitbash",
 "shell": "sh -c",
 "when": "2026-09-28T16:36:42",
 "host": "BLACK-5800G",
 "n": 76,
 "counts": {
  "ok": 74,
  "output-differs": 2
 },
 "survival_pct": 97.4,
 "results": [
  {
   "id": "red-devnull",
   "category": "redirection",
   "command": "echo hi > /dev/null; echo done",
   "expected_stdout": "done",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "done\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "red-stderr",
   "category": "redirection",
   "command": "ls nosuchfile 2>/dev/null; echo done",
   "expected_stdout": "done",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "done\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "red-combine",
   "category": "redirection",
   "command": "echo out; echo err 1>&2",
   "expected_stdout": "out",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "out\n",
   "stderr": "err\n",
   "outcome": "ok"
  },
  {
   "id": "red-append",
   "category": "redirection",
   "command": "echo a > f1; echo b >> f1; cat f1",
   "expected_stdout": "a\nb",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "a\nb\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "red-pipe",
   "category": "redirection",
   "command": "echo hello | tr a-z A-Z",
   "expected_stdout": "HELLO",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "HELLO\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "red-heredoc",
   "category": "redirection",
   "command": "cat <<EOF\nline1\nline2\nEOF",
   "expected_stdout": "line1\nline2",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "line1\nline2\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "exit-true",
   "category": "exitcode",
   "command": "true; echo $?",
   "expected_stdout": "0",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "0\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "exit-false",
   "category": "exitcode",
   "command": "false; echo $?",
   "expected_stdout": "1",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "1\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "exit-and",
   "category": "exitcode",
   "command": "true && echo yes",
   "expected_stdout": "yes",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "yes\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "exit-or",
   "category": "exitcode",
   "command": "false || echo fallback",
   "expected_stdout": "fallback",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "fallback\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "exit-semicolon",
   "category": "exitcode",
   "command": "echo a; echo b",
   "expected_stdout": "a\nb",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "a\nb\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "exit-grep-nomatch",
   "category": "exitcode",
   "command": "echo abc | grep -q zzz; echo $?",
   "expected_stdout": "1",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "1\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "exit-propagate",
   "category": "exitcode",
   "command": "false",
   "expected_stdout": "",
   "expected_exit": 1,
   "exit": 1,
   "stdout": "",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "exit-pipefail",
   "category": "exitcode",
   "command": "set -o pipefail; false | true; echo $?",
   "expected_stdout": "1",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "1\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "txt-grep",
   "category": "text",
   "command": "printf \"a\\nb\\nc\\n\" > f; grep b f",
   "expected_stdout": "b",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "b\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "txt-grep-n",
   "category": "text",
   "command": "printf \"a\\nb\\n\" > f; grep -n b f",
   "expected_stdout": "2:b",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "2:b\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "txt-sed",
   "category": "text",
   "command": "echo foobar | sed \"s/foo/baz/\"",
   "expected_stdout": "bazbar",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "bazbar\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "txt-sed-i",
   "category": "text",
   "command": "echo foo > f; sed -i \"s/foo/bar/\" f; cat f",
   "expected_stdout": "bar",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "bar\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "txt-awk",
   "category": "text",
   "command": "echo \"a b c\" | awk \"{print \\$2}\"",
   "expected_stdout": "b",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "b\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "txt-cut",
   "category": "text",
   "command": "echo \"a:b:c\" | cut -d: -f2",
   "expected_stdout": "b",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "b\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "txt-sort-uniq",
   "category": "text",
   "command": "printf \"b\\na\\nb\\n\" | sort | uniq",
   "expected_stdout": "a\nb",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "a\nb\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "txt-wc",
   "category": "text",
   "command": "printf \"a\\nb\\nc\\n\" | wc -l | tr -d \" \"",
   "expected_stdout": "3",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "3\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "txt-head",
   "category": "text",
   "command": "printf \"1\\n2\\n3\\n\" | head -2",
   "expected_stdout": "1\n2",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "1\n2\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "txt-tail",
   "category": "text",
   "command": "printf \"1\\n2\\n3\\n\" | tail -1",
   "expected_stdout": "3",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "3\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "txt-tr-delete",
   "category": "text",
   "command": "echo \"a1b2\" | tr -d \"0-9\"",
   "expected_stdout": "ab",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "ab\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "txt-rev-sort-n",
   "category": "text",
   "command": "printf \"10\\n9\\n\" | sort -n",
   "expected_stdout": "9\n10",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "9\n10\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "var-subst",
   "category": "vars",
   "command": "X=$(echo hi); echo $X",
   "expected_stdout": "hi",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "hi\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "var-backtick",
   "category": "vars",
   "command": "X=`echo hi`; echo $X",
   "expected_stdout": "hi",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "hi\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "var-inline-env",
   "category": "vars",
   "command": "FOO=bar sh -c 'echo $FOO'",
   "expected_stdout": "bar",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "bar\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "var-export",
   "category": "vars",
   "command": "export FOO=bar; echo $FOO",
   "expected_stdout": "bar",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "bar\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "var-default",
   "category": "vars",
   "command": "echo ${UNSET_VAR_XYZ:-fallback}",
   "expected_stdout": "fallback",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "fallback\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "var-arith",
   "category": "vars",
   "command": "echo $((2 + 3))",
   "expected_stdout": "5",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "5\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "quote-single",
   "category": "quoting",
   "command": "echo 'a b'",
   "expected_stdout": "a b",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "a b\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "quote-double",
   "category": "quoting",
   "command": "echo \"a b\"",
   "expected_stdout": "a b",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "a b\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "quote-nested",
   "category": "quoting",
   "command": "echo \"outer 'inner' end\"",
   "expected_stdout": "outer 'inner' end",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "outer 'inner' end\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "quote-dollar-literal",
   "category": "quoting",
   "command": "echo 'costs $5'",
   "expected_stdout": "costs $5",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "costs $5\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "quote-backslash",
   "category": "quoting",
   "command": "printf \"a\\tb\\n\"",
   "expected_stdout": "a\tb",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "a\tb\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "quote-glob-literal",
   "category": "quoting",
   "command": "echo \"*\"",
   "expected_stdout": "*",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "*\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "path-mkdir-p",
   "category": "paths",
   "command": "mkdir -p a/b/c && echo ok",
   "expected_stdout": "ok",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "ok\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "path-nested-write",
   "category": "paths",
   "command": "mkdir -p x/y && echo v > x/y/f && cat x/y/f",
   "expected_stdout": "v",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "v\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "path-spaces",
   "category": "paths",
   "command": "mkdir -p \"dir with spaces\" && echo v > \"dir with spaces/f\" && cat \"dir with spaces/f\"",
   "expected_stdout": "v",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "v\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "path-unicode",
   "category": "paths",
   "command": "mkdir -p \"\u03b5\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac\" && echo v > \"\u03b5\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac/f\" && cat \"\u03b5\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac/f\"",
   "expected_stdout": "v",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "v\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "path-relative-up",
   "category": "paths",
   "command": "mkdir -p p/q && cd p/q && cat ../../marker",
   "expected_stdout": "MARK",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "MARK\r\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "path-basename",
   "category": "paths",
   "command": "basename /a/b/c.txt",
   "expected_stdout": "c.txt",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "c.txt\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "path-dirname",
   "category": "paths",
   "command": "dirname /a/b/c.txt",
   "expected_stdout": "/a/b",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "/a/b\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "path-trailing-slash",
   "category": "paths",
   "command": "mkdir -p t && ls -d t/ | tr -d \"/\"",
   "expected_stdout": "t",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "t\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "case-two-files",
   "category": "case",
   "command": "echo one > Alpha.txt; echo two > alpha.txt; ls | grep -ci alpha | tr -d \" \"",
   "expected_stdout": "2",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "1\n",
   "stderr": "",
   "outcome": "output-differs"
  },
  {
   "id": "case-distinct-content",
   "category": "case",
   "command": "echo one > Beta.txt; echo two > beta.txt; cat Beta.txt",
   "expected_stdout": "one",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "two\n",
   "stderr": "",
   "outcome": "output-differs"
  },
  {
   "id": "case-grep-sensitive",
   "category": "case",
   "command": "echo Hello > f; grep -c hello f | tr -d \" \"",
   "expected_stdout": "0",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "0\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "glob-star",
   "category": "glob",
   "command": "touch g1.txt g2.txt; ls *.txt | sort",
   "expected_stdout": "g1.txt\ng2.txt",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "g1.txt\ng2.txt\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "glob-in-for",
   "category": "glob",
   "command": "touch h1.md h2.md; for f in *.md; do echo $f; done | sort",
   "expected_stdout": "h1.md\nh2.md",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "h1.md\nh2.md\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "glob-no-match",
   "category": "glob",
   "command": "ls *.nonexistentext 2>/dev/null; echo done",
   "expected_stdout": "done",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "done\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "find-name",
   "category": "find",
   "command": "mkdir -p d && touch d/a.py d/b.py && find d -name \"*.py\" | sort",
   "expected_stdout": "d/a.py\nd/b.py",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "d/a.py\nd/b.py\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "find-type-f",
   "category": "find",
   "command": "mkdir -p e/sub && touch e/f1 && find e -type f",
   "expected_stdout": "e/f1",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "e/f1\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "find-exec",
   "category": "find",
   "command": "mkdir -p k && touch k/z.txt && find k -name \"*.txt\" -exec basename {} \\;",
   "expected_stdout": "z.txt",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "z.txt\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "xargs-basic",
   "category": "find",
   "command": "printf \"a\\nb\\n\" | xargs echo",
   "expected_stdout": "a b",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "a b\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "xargs-null",
   "category": "find",
   "command": "mkdir -p n && touch \"n/a b.txt\" && find n -type f -print0 | xargs -0 basename",
   "expected_stdout": "a b.txt",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "a b.txt\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "eol-printf-lf",
   "category": "eol",
   "command": "printf \"a\\nb\\n\" > f; wc -c < f | tr -d \" \"",
   "expected_stdout": "4",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "4\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "eol-echo-roundtrip",
   "category": "eol",
   "command": "echo abc > f; cat f",
   "expected_stdout": "abc",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "abc\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "eol-echo-bytes",
   "category": "eol",
   "command": "echo abc | wc -c | tr -d \" \"",
   "expected_stdout": "4",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "4\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "tool-git",
   "category": "tools",
   "command": "git --version > /dev/null && echo present",
   "expected_stdout": "present",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "present\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "tool-python",
   "category": "tools",
   "command": "python3 -c \"print(1)\" 2>/dev/null || python -c \"print(1)\"",
   "expected_stdout": "1",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "1\r\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "tool-curl",
   "category": "tools",
   "command": "curl --version > /dev/null 2>&1 && echo present",
   "expected_stdout": "present",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "present\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "tool-tar",
   "category": "tools",
   "command": "tar --version > /dev/null 2>&1 && echo present",
   "expected_stdout": "present",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "present\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "tool-diff",
   "category": "tools",
   "command": "echo a > f1; echo a > f2; diff f1 f2 && echo same",
   "expected_stdout": "same",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "same\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "tool-realpath",
   "category": "tools",
   "command": "realpath . > /dev/null && echo present",
   "expected_stdout": "present",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "present\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "tool-stat",
   "category": "tools",
   "command": "touch f; stat -c %s f 2>/dev/null || stat -f %z f",
   "expected_stdout": "0",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "0\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "tool-du",
   "category": "tools",
   "command": "du -h . > /dev/null && echo present",
   "expected_stdout": "present",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "present\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "tool-which",
   "category": "tools",
   "command": "which echo > /dev/null && echo present",
   "expected_stdout": "present",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "present\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "coh-write-read",
   "category": "coherence",
   "command": "echo v > f && cat f",
   "expected_stdout": "v",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "v\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "coh-write-stat",
   "category": "coherence",
   "command": "echo abcd > f && wc -c < f | tr -d \" \"",
   "expected_stdout": "5",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "5\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "coh-write-find",
   "category": "coherence",
   "command": "touch fresh.txt && find . -name \"fresh.txt\" | head -1",
   "expected_stdout": "./fresh.txt",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "./fresh.txt\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "coh-append-read",
   "category": "coherence",
   "command": "echo a > f; echo b >> f; tail -1 f",
   "expected_stdout": "b",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "b\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "coh-delete-gone",
   "category": "coherence",
   "command": "touch gone.txt && rm gone.txt && ls gone.txt 2>/dev/null; echo checked",
   "expected_stdout": "checked",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "checked\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "coh-mv-visible",
   "category": "coherence",
   "command": "echo v > src && mv src dst && cat dst",
   "expected_stdout": "v",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "v\n",
   "stderr": "",
   "outcome": "ok"
  },
  {
   "id": "coh-subshell-sees",
   "category": "coherence",
   "command": "echo v > f && sh -c \"cat f\"",
   "expected_stdout": "v",
   "expected_exit": 0,
   "exit": 0,
   "stdout": "v\n",
   "stderr": "",
   "outcome": "ok"
  }
 ]
}
