Get the latest tech news

How to parse config files with Bash


Keeping program configurations separate from code is important. It enables non-programmers to alter configurations without having to modify the program's code.

The Linux Filesystem Hierarchical Standard defines~/bin as the appropriate place for users to store their executable files. Every Linux host that uses Bash—which is pretty much all of them since Bash is the default shell for all distributions—includes some excellent, built-in examples of sourcing. This article explored sourcing for pulling code and variable assignments into a Bash program.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Bash

Bash

Photo of config files

config files

Related news:

News photo

Amber: Programming language compiled to Bash

News photo

Natural language processing in Bash (2023)

News photo

Bash's sadly flawed smart (programmable) completion