Created
August 16, 2018 16:24
-
-
Save thesubtlety/8ebcf37cf74dde0c832256cae7e1e186 to your computer and use it in GitHub Desktop.
MacScriptify bash oneliner
This file contains 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
# save oneliner as macscript.txt | |
$f=macscript.txt; echo "Dim s As String\n"; for each in $(base64 -w0 <<< $(cat f) | fold -w 90); do echo "s = s + \"$each\""; done | sed '0,/\ s\ \+/{s/\ \+//}'; echo 'MacScript "do shell script "" echo " & s & " | base64 -D | bash "" "'; echo 'End Sub' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment