Home > Back-end >  bash - Function for string split that uses only awk and accepts any string as input and as delimiter
bash - Function for string split that uses only awk and accepts any string as input and as delimiter

Time:08-06

The proposal is to be a bash function using only awk 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 uses only awk and 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 all of them only work in specific cases and not according to our proposal.

Thanks and be kind!

  • Related