{
 "arm": "W-gitbash",
 "shell": "sh -c",
 "when": "2026-09-28T16:45:42",
 "n": 24,
 "results": [
  {
   "id": "case-overwrite",
   "question": "do two names differing only in case become one file",
   "command": "echo one > Beta.txt; echo two > beta.txt; cat Beta.txt; ls | wc -l | tr -d \" \"",
   "exit": 0,
   "stdout": "two\n1",
   "stderr": ""
  },
  {
   "id": "case-mkdir",
   "question": "does the second mkdir of a case variant succeed",
   "command": "mkdir Alpha 2>/dev/null; mkdir alpha 2>/dev/null; echo \"dirs=$(ls -d */ 2>/dev/null | wc -l | tr -d \\\" \\\")\"",
   "exit": 0,
   "stdout": "dirs=",
   "stderr": "tr: extra operand '\"'\nOnly one string may be given when deleting without squeezing repeats.\nTry 'tr --help' for more information."
  },
  {
   "id": "case-rename",
   "question": "can a file be renamed to differ only in case",
   "command": "echo v > low.txt; mv low.txt LOW.txt 2>/dev/null; ls | tr \"\\n\" \",\"",
   "exit": 0,
   "stdout": "LOW.txt,",
   "stderr": ""
  },
  {
   "id": "case-glob",
   "question": "does a glob match a different case",
   "command": "touch data.txt; ls *.TXT 2>/dev/null | wc -l | tr -d \" \"",
   "exit": 0,
   "stdout": "0",
   "stderr": ""
  },
  {
   "id": "case-cd",
   "question": "does cd accept the wrong case",
   "command": "mkdir -p RealDir; cd realdir 2>/dev/null && echo entered || echo refused",
   "exit": 0,
   "stdout": "entered",
   "stderr": ""
  },
  {
   "id": "symlink",
   "question": "does ln -s make a link or silently copy",
   "command": "echo v > target; ln -s target link 2>/dev/null; if [ -L link ]; then echo symlink; elif [ -f link ]; then echo copy; else echo none; fi",
   "exit": 0,
   "stdout": "copy",
   "stderr": ""
  },
  {
   "id": "hardlink",
   "question": "does ln make a hard link that shares content",
   "command": "echo a > orig; ln orig hard 2>/dev/null; echo b > orig; cat hard 2>/dev/null || echo nolink",
   "exit": 0,
   "stdout": "b",
   "stderr": ""
  },
  {
   "id": "chmod-honoured",
   "question": "does chmod change what ls reports",
   "command": "touch f; chmod 600 f; ls -l f | cut -c1-10",
   "exit": 0,
   "stdout": "-rw-r--r--",
   "stderr": ""
  },
  {
   "id": "exec-bit",
   "question": "does a script need and keep an exec bit",
   "command": "printf \"#!/bin/sh\\necho ran\\n\" > s.sh; chmod +x s.sh; ./s.sh 2>/dev/null || echo blocked",
   "exit": 0,
   "stdout": "ran",
   "stderr": ""
  },
  {
   "id": "trailing-dot",
   "question": "does a trailing dot survive in a filename",
   "command": "touch \"name.\" 2>/dev/null; ls | tr \"\\n\" \",\"",
   "exit": 0,
   "stdout": "name.,",
   "stderr": ""
  },
  {
   "id": "trailing-space",
   "question": "does a trailing space survive in a filename",
   "command": "touch \"name \" 2>/dev/null; ls | sed \"s/ $/<SP>/\" | tr \"\\n\" \",\"",
   "exit": 0,
   "stdout": "name<SP>,",
   "stderr": ""
  },
  {
   "id": "reserved-name",
   "question": "what happens to a Windows reserved device name",
   "command": "echo v > aux.txt 2>/dev/null && echo wrote || echo refused; echo v > con 2>/dev/null && echo wrote-con || echo refused-con; ls | tr \"\\n\" \",\"",
   "exit": 0,
   "stdout": "wrote\nwrote-con\naux.txt,con,",
   "stderr": ""
  },
  {
   "id": "colon-in-name",
   "question": "is a colon legal in a filename",
   "command": "echo v > \"a:b\" 2>/dev/null && echo wrote || echo refused; ls | tr \"\\n\" \",\"",
   "exit": 0,
   "stdout": "wrote\na:b,",
   "stderr": ""
  },
  {
   "id": "delete-open-file",
   "question": "can a file be deleted while it is open",
   "command": "echo v > f; (sleep 3 & ) ; exec 3< f; rm f 2>/dev/null && echo deleted || echo locked; exec 3<&-",
   "exit": 0,
   "stdout": "deleted",
   "stderr": ""
  },
  {
   "id": "overwrite-open-file",
   "question": "can a file be written while another handle holds it",
   "command": "echo a > f; exec 3< f; echo b > f 2>/dev/null && echo wrote || echo locked; exec 3<&-; cat f",
   "exit": 0,
   "stdout": "wrote\nb",
   "stderr": ""
  },
  {
   "id": "crlf-roundtrip",
   "question": "does a written LF file read back as LF",
   "command": "printf \"a\\nb\\n\" > f; wc -c < f | tr -d \" \"",
   "exit": 0,
   "stdout": "4",
   "stderr": ""
  },
  {
   "id": "crlf-sed-preserve",
   "question": "does sed -i on a CRLF file preserve the CRLF",
   "command": "printf \"a\\r\\nb\\r\\n\" > f; sed -i \"s/a/x/\" f; wc -c < f | tr -d \" \"",
   "exit": 0,
   "stdout": "4",
   "stderr": ""
  },
  {
   "id": "crlf-grep-anchor",
   "question": "does an end anchor match when the line ends CRLF",
   "command": "printf \"abc\\r\\n\" > f; grep -c \"abc$\" f | tr -d \" \"",
   "exit": 0,
   "stdout": "1",
   "stderr": ""
  },
  {
   "id": "long-path",
   "question": "how deep can a path go before it breaks",
   "command": "p=.; for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do p=\"$p/dirname_that_is_long_enough_to_matter_$i\"; done; mkdir -p \"$p\" 2>/dev/null && echo v > \"$p/f\" 2>/dev/null && cat \"$p/f\" || echo failed",
   "exit": 0,
   "stdout": "v",
   "stderr": ""
  },
  {
   "id": "unicode-name",
   "question": "does a non-ascii filename survive a round trip",
   "command": "echo v > \"\u03b5\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac.txt\" 2>/dev/null; ls | tr \"\\n\" \",\"; cat \"\u03b5\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac.txt\" 2>/dev/null || echo unreadable",
   "exit": 0,
   "stdout": "\u03b5\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac.txt,v",
   "stderr": ""
  },
  {
   "id": "mtime-order",
   "question": "do two writes produce distinguishable mtimes",
   "command": "echo a > f1; echo b > f2; ls -t | head -1",
   "exit": 0,
   "stdout": "f1",
   "stderr": ""
  },
  {
   "id": "du-apparent",
   "question": "does an empty file report zero bytes",
   "command": "touch f; wc -c < f | tr -d \" \"",
   "exit": 0,
   "stdout": "0",
   "stderr": ""
  },
  {
   "id": "rm-rf-readonly",
   "question": "can a read only file be removed without a prompt",
   "command": "echo v > f; chmod 444 f; rm -f f 2>/dev/null; ls f 2>/dev/null && echo still-there || echo gone",
   "exit": 0,
   "stdout": "gone",
   "stderr": ""
  },
  {
   "id": "pipe-binary",
   "question": "does binary survive a pipe unmangled",
   "command": "printf \"a\\000b\" | wc -c | tr -d \" \"",
   "exit": 0,
   "stdout": "3",
   "stderr": ""
  }
 ]
}
