I am trying to assign the path of a file to a variable so I am doing something like:
PATH = dirname script.sh
However I am g开发者_如何学Pythonetting an error. Can someone assist? Thanks.
Sincerely,
Eric Anderson
There can be no spaces between the variable name and the equals sign. Also, I think you meant to run the dirname command, so what you would want is something more like this:
PATH=$(dirname script.sh)
精彩评论