Created
November 16, 2016 21:56
-
-
Save neilmartin83/bd96fdf3f78f2c4f250455f260ddaa24 to your computer and use it in GitHub Desktop.
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/sh | |
| ## Script to detect and enumerate attached iLok Serial | |
| SERIAL=`system_profiler SPUSBDataType | grep -B 5 -i ': iLok' | grep 'Serial' | cut -f 2 -d ":" | sed -e "s/ //"` | |
| #SERIAL=`system_profiler SPUSBDataType | grep -B 5 -i ': iLok' | grep 'Serial'` | |
| if [[ "$SERIAL" == "" ]] | |
| then | |
| echo '<result>'No iLok Connected'</result>' | |
| else | |
| echo '<result>'$SERIAL'</result>' | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment