Home > database >  bash - A pure bash function for splitting strings that accepts any string as input and as delimiter
bash - A pure bash function for splitting strings that accepts any string as input and as delimiter

Time:08-12

The proposal is to be a pure bash function for splitting strings that accepts any string as a delimiter and any string as an input.

QUESTION: How to create a function for splitting strings that accepts any string as input and as delimiter?

!!!REASON FOR QUESTION!!! There are many, many proposals (see this example) for string splitting with bash commands, but almost all of them only work in specific cases and not according to our proposal.

NOTES: We consider the following Linux distributions in their latest versions to be eligible as compatible plataforms -> Debiam, Ubuntu (server and desktop), Arch, RedHat, CentOS, SUSE (server and desktop).

Thanks and be kind!

  • Related