Horje
how to assign values from a loop in bash to a single variabel Code Example
how to assign values from a loop in bash to a single variabel
results=()

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

# print the results:

printf "%s\n" "${results[@]}"




Shell

Related
linux guzzlehttp/psr7 Code Example linux guzzlehttp/psr7 Code Example
bash get unique lines Code Example bash get unique lines Code Example
debian 10 install jenkins Code Example debian 10 install jenkins Code Example
connect to git repo with ssh-rsa Code Example connect to git repo with ssh-rsa Code Example
github axios Code Example github axios Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11