loading . . . split one file into multiple files with awk I recently migrated my monolithic zshrc into “part files”. I wanted to do that by delimiting regions and processing those regions into separate files. I learned about csplit, which can do that given a delimiter. However, csplit has no affordance for setting the filename – every new section is a new file, with an autoincrementing number. Here’s a way to do it with gawk. It expects a file delimited with #: filename lines into multiple files, each of which is named by the filename specified in the delimiter. https://www.howett.net/spellbook/split_file_into_multiple_files/