The POSIX shell is ‘stringy’, and its ecosystem primarily sup- ports line-oriented formats. While such formats are popular and common, contemporary programming often involves semi-structured data, like JSON or YAML. Dealing with such formats, the shell’s stringiness leaves users out in the cold—the POSIX ecosystem struggles with semi-structured data. New command-line tools work well with ‘modern’ data formats, but each tool is its own complex language to learn.
The tree-like filesystem is the shell’s only real data structure. By mapping ‘modern’ formats onto file hierarchies, we can work effectively in the existing ecosystem.
We introduce ffs, the file filesystem, a new tool for mapping semi-structured data formats to filesystems in userspace. Like /proc and /sys, our filesystem-based approach helps the shell (and other tools) manipulate structured data.
Github: https://github.com/mgree/ffs
Paper: https://dl.acm.org/doi/10.1145/347711...
PLOS 2021 proceedings: https://dl.acm.org/doi/proceedings/10...