Skip to content

Ad Hoc Protocols in Unix

andychu edited this page Jul 9, 2021 · 7 revisions

Related: Unix Tools

Data / "microformats"

  • shebang lines: recognized by the kernel
  • gF in Vim recognizes filename and line number!
  • /* vim */ options
  • yacc, in y.tab.c output:
    • #line 407 "/usr/homes/chet/src/bash/src/parse.y" /* yacc.c:1646 */
    • this appears to be recognized by code coverage reporting tools? They show parse.y output.
      • This actually affects the C compiler's idea of "current file and line". It affects error messages from C compiler, and debug info that goes into/alongside the executable. Code coverage tools probably read the debug info. I think it was invented as an internal protocol between C preprocessor -> C compiler, but proved useful for public use by code generation tools like yacc...
  • various "text files" in /proc on Linux

Code over Pipes

  • eval "$(ssh-agent)"
  • gcc -M sends a Makefile fragment
Clone this wiki locally