diff --git a/README.md b/README.md index 4b1d011..cbe28eb 100644 --- a/README.md +++ b/README.md @@ -308,7 +308,7 @@ This is an alternative to `cut`, `awk` and other tools. ```sh split() { # Usage: split "string" "delimiter" - IFS=$'\n' read -d "" -ra arr <<< "${1//$2/$'\n'}" + mapfile -t arr <<< "${1//$2/$'\n'}" printf '%s\n' "${arr[@]}" } ```