vendredi 4 juin 2021

Using the "Everything is a File" design principle and the rest of the Unix philosophy in creating and querying data from flat files

I'm writing a command line tool that stores specific information about a task:

  1. Task name
  2. Task date
  3. Task recurrence

..etc, etc.

I'm trying to design the software in accordance with the guidance of the Unix philosophy, the rules of which are summarised here. The reason for this is so that it integrates well with other Unix command line tools, eg. xargs, grep, ls, awk, etc. so that I can mangle input and output to get what I want from it.

My question is, how would I store individual tasks in a way that was UNIX-y and best suited for interoperability? My initial idea would be storing each task in its own file, and creating subset files for every day's due task, etc. but this seems tedious. How would I store data in a way that is fundamentally UNIX-y?

Aucun commentaire:

Enregistrer un commentaire