Last active
April 6, 2016 22:56
-
-
Save opragel/8875401b5ae61ab263107e485e3fe896 to your computer and use it in GitHub Desktop.
spss_is_bad_but_so_is_this.sh
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 | |
SPSS_STATISTICS_PATH="/Applications/IBM/SPSS/Statistics/" | |
SPSS_DAEMONHOST="mycooldaemonhost" | |
if [ -d "$SPSS_STATISTICS_PATH" ]; then | |
spssVersion=$(ls "$SPSS_STATISTICS_PATH" | tail -n 1) | |
spssInfPath='/Applications/IBM/SPSS/Statistics/'"$spssVersion"'/Contents/bin/spssprod.inf' | |
if [ -f "$spssInfPath" ]; then | |
sed -i.bak "s/DaemonHost=.*/DaemonHost=$SPSS_DAEMONHOST/" "$spssInfPath" | |
else | |
printf "can't find SPSS INF at %s :(" "$spssInfPath" | |
fi | |
else | |
printf "can't find SPSS statistics folder at %s :(" "$SPSS_STATISTICS_PATH" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment