2 Matching Annotations
  1. Mar 2022
    1. Just let it expand inside an array declaration's right side: list=(../smth*/) # grab the list echo "${#list[@]}" # print array length echo "${list[@]}" # print array elements for file in "${list[@]}"; do echo "$file"; done # loop over the array