Created
April 5, 2020 10:33
-
-
Save juniorprincewang/8586723ca2c58e5d1e50a5381c2632f6 to your computer and use it in GitHub Desktop.
Get cuda version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| version="$(cat /usr/local/cuda/version.txt | head -n1|cut -d " " -f3)" | |
| echo $version | |
| majorminor=${version%.*} | |
| echo $majorminor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment