2

On Linux, each software can decide the configuration format he wishes to use. Some uses TOML, INI, JSON, XML, CSV, YAML, JS, CSS, scripts, and so on.

However, some configuration files use kind of INI-like text formats, which seem non-standard, e.g. :

A text file in which each line is composed of a key and a value separated by one or many white space characters, line beginning by "#" are comments, and sometime it has some kind of "blocs" (e.g. in SSH) :

Include /etc/ssh/ssh_config.d/*.conf

Host *
#   ForwardAgent no
    SendEnv LANG LC_*

A variant is used (e.g. in Nginx) in which "blocs" are defined by {} :

server {
    listen 127.0.0.1:80;
}

Is there any name/group of words used to designate this type/family/kind of formats ?

2
  • "Standard [file formats] are great. There are so many to choose from." In Unix/Linux applications, there are a lot of applications that use unique (custom) file formats. The colon-delimited /etc/passwd and /etc/shadow files, the text formats of /etc/resolve.conf and /etc/nsswitch.conf, etc., ad nauseum. Because they're unique, it's difficult to say they're part of a category of file formats.
    – Sotto Voce
    Jan 17, 2023 at 17:21
  • @SottoVoce Obligatory xkcd link.
    – doneal24
    Jan 17, 2023 at 19:59

1 Answer 1

1

"Text-based configuration format, with weak structural hierarchy"

is what I'd call the common denominator of both examples. An nginx config file is syntactically as different to an SSH config file as it is to JSON – it might look similar on a cursory glance, but the things both parsers can do with the content of the file are sufficiently different that I wouldn't even want to throw them in the same class of syntaxes.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .