Sort by

recency

|

152 Discussions

|

  • + 0 comments

    readarray list

    echo ${list[@]}

  • + 0 comments
    declare -a array=()
    
    while read r; do
        array=("${array[@]}" "$r")
    done
    echo ${array[@]}
    
  • + 1 comment

    or just xargs

    • + 0 comments

      hacker

  • + 0 comments

    mapfile -t array echo "${array[*]}"

  • + 0 comments

    Simply use mapfile:

    mapfile -t array
    echo "${array[@]}"