blob: f04f68d1e04079d46f9370c23a4128845f4cba8b (
plain) (
tree)
|
|
#!/bin/sh
join(){
# Join strings by a given delimiter.
# $1 = delimiter
# $2..$N = strings
_bcj_delim=$1; shift
_bcj_result=''
while [ $# -gt 0 ]; do
_bcj_result="${_bcj_result:+${_bcj_result}${_bcj_delim}}${1}"
shift
done
printf '%s' "$_bcj_result"
}
|