2 Matching Annotations
- Mar 2022
-
unix.stackexchange.com unix.stackexchange.com
-
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
-
-
stackoverflow.com stackoverflow.com
-
The short answer is that you want an array: dirs=(/content/{dev01,dev01})
-