linux - Get the time when nohup R program finishes -
i want time when program finish. show same time. here shell script. show start time
same end time
. how fix that?
start=$(date +"%r") nohup rscript program_1.r >program_1.rout & wait & echo start time = $start\n end time = " `date +"%r"`";
you sending r script background, date executed immediately.
instead of
date +%r; sleep 5 & date +%r
do
date +%r; (sleep 5; date +%r) &
Comments
Post a Comment