Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

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

VARIABLE=$(for time in ...; do ...; done)
Comment

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
" "${results[@]}"
Comment

PREVIOUS NEXT
Code Example
Shell :: wget quier 
Shell :: #include <bluetooth/bluetooth.h 
Shell :: yum snap install --classic certbot 
Shell :: head until last line 
Shell :: ubuntu terminal how to copy and move file 
Shell :: ubuntu tar all .log and .txt 
Shell :: telecharger un site avec linux 
Shell :: louisiana muskrat bounty 
Shell :: gimp : Dépend: libgimp2.0 (= 2.10.18) mais ne sera pas installé Dépend: libgimp2.0 (<= 2.10.18-z) mais ne sera pas installé Dépend: libgegl-0.4-0 (= 0.4.22) mais ne sera pas installé 
Shell :: zmq.hpp not found 
Shell :: rebase forked branch with master 
Shell :: bash commands inside Tcl 
Shell :: debian install wrk 
Shell :: windows launch node with multiple environment variables 
Shell :: how to find last occurrence of a pattern file 
Shell :: Como excluir uma tag remota 
Shell :: checkout file of different commit 
Shell :: git commit message encoding 
Shell :: hjhvjhv 
Shell :: shell script to subtract two hex values 
Shell :: E: No se pudo abrir el fichero de bloqueo «/var/cache/apt/archives/lock» 
Shell :: install-lamp-stack-ubuntu-20-04-server-desktop 
Shell :: skolen.min 
Shell :: test project at a previous point in history in github 
Shell :: raspberry shell get datetime now 
Shell :: container has runAsNonRoot and image has non-numeric user 
Shell :: ${1:?} bash 
Shell :: install vert manager linux 
Shell :: youtube-dl Video Selection:: 
Shell :: install Postfix to send notification emails 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =