bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(question) fast split/join of strings


From: William Park
Subject: (question) fast split/join of strings
Date: Tue, 17 Sep 2024 02:21:09 -0400
User-agent: Mozilla Thunderbird

Hi all,

Is there fast way of splitting and joining of strings in the recent Bash versions?

For splitting, I'm aware of
    old="a,b,c"
    IFS=, read -a arr <<< "$old"

For joining,
    new=$(IFS=,; echo "${arr[*]}")
or
    new=$(IFS=,; echo "$*")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]