-b, --suffix-format
Use sprintf FORMAT instead of %02d.
An option of csplitx.
Usage
csplitx -b FORMAT FILE PATTERN...
csplitx --suffix-format=FORMAT FILE PATTERN...Details
| Short | Long | Value | Default | Meaning |
|---|---|---|---|---|
-b | --suffix-format | FORMAT | use sprintf FORMAT instead of %02d |
Examples
Split a Markdown book into one file per chapter (each starting with '# ')
csplitx -f chapter- -b '%02d.md' book.md '/^# /' '{*}'0
18234
22917
15002Do the same without the empty file before the first chapter
csplitx -z -f chapter- -b '%02d.md' book.md '/^# /' '{*}'Split a multi-document Kubernetes YAML into one manifest per file, dropping the '---' lines
csplitx -z --suppress-matched -f manifest- -b '%02d.yaml' all.yaml '/^---$/' '{*}'Help in the terminal
gnux help csplitx --suffix-format