Skip to content

Instantly share code, notes, and snippets.

@vshmoylov
Created May 12, 2022 20:08
Show Gist options
  • Save vshmoylov/f5e9f01e6470de43c38f22508b33bb77 to your computer and use it in GitHub Desktop.
Save vshmoylov/f5e9f01e6470de43c38f22508b33bb77 to your computer and use it in GitHub Desktop.
Join array of strings in bash
RESULT=""
for element in $ARRAY ; do
RESULT="$RESULT${RESULT:+,}$element"
done
@vshmoylov
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment