Created
January 17, 2020 08:13
-
-
Save KartaviK/c9e64e15f9f4ffd21b7449d64fd01f9c to your computer and use it in GitHub Desktop.
Implode array of items using given separator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function implode() { | |
local IFS="${1}"; | |
shift; | |
echo "${*}"; | |
} | |
echo $(implode ${1} ${@:2}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment