are used" | tail -n 1 | cut -d " " -f4` if [ -z "$cpu_count" ] && tail -n 1 "$log_head_name" | grep -q "Your Alias is .*-cpu"; then cpu_count=1 else cpu_count=0 fi gpu_count=`cat $log_head_name | grep "CUDA devices are used" | tail -n 1 | cut -d "...