I am doing some automation with shell scripting and I am having trouble running a python script in which its’ path has spaces. Forgive me if I made any mistakes or bad practices in the code, I just started learning yesterday :). Here is the code: # grabs root directory from the script path script_path="$( […]
- Tags and run it, I am doing some automation with shell scripting and I am having trouble running a python script in which its' path has spaces. Forgive me if, I get an error on line 3. If I copy and paste line 2 directly into my shell, I just started learning yesterday :). Here is the code: # grabs root directory from the script path script_path="$( cd "$(dirname "$0")" >/, I've surrounded the path with double-quotes. If I run that however, it works. I'm not sure why my command isn't working in my shell script. Is there something wrong with how I am escaping the spaces or running, you can see that there is a space in between my user name so I escaped it with a backslash. The second line is the full python command that I