the command nvcc --version outputs the following:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_21:14:42_PDT_2019
Cuda compilation tools, release 10.2, V10.2.89
I'm trying to get the cuda version which in this case is 10.2 from the 4th line.
Therefore i tried the following:
cudaVersion="$(nvcc --version| grep 'Cuda compilation ')"
echo "$cudaVersion"
this gives me however the whole line as an output. However i just want to assign the version to cudaVersion
I believe this must work with cut, however i can't get it
Thanks in advance
