I want to run my python script through the shell, passing variable a.
Here is my code:
else
a=0
osascript -e 'tell application "Terminal" to activate' \
-e 'tell application "System Events" to keystroke "n" using {command down}' \
-e 'tell application "Terminal" to do script "python /Users/kacperXXX/instagram_bot.py \"$a\"" in front window'
sleep 5
exit
fi
My script just prints its arguments. When I run it I got empty list only with file path.
Output
['/Users/kacperleczynski/Desktop/instagram_bot.py', '']
Thanks for advice.