Answers for "how to collect values from each iteration of a loop and save them bash"

0

how to collect values from each iteration of a loop and save them bash

results=()

for time in ${seconds_list}; do
    results+=($(bc -l <<< "scale=2; ($cur_time-$time)/3600"))
done

# print the results:

printf "%s\n" "${results[@]}"
Posted by: Guest on November-19-2020
0

how to collect values from each iteration of a loop and save them bash

VARIABLE=$(for time in ...; do ...; done)
Posted by: Guest on November-19-2020

Code answers related to "how to collect values from each iteration of a loop and save them bash"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language