↧
Answer by Ricky for scriptdir=`dirname $0` not working
dirname -- "$0"The -- (dash dash) stops dirname from processing any options in the argument. Always quote $0 in case there are spaces in the name.
View ArticleAnswer by Biapy for scriptdir=`dirname $0` not working
use quotes. It may fix your issue.scriptdir=`dirname -- "$0"`I personnaly prefer this notation in bash scripts, but it is not mandatory:scriptdir="$(command dirname -- "${0}")"EDIT:You may find the...
View Articlescriptdir=`dirname $0` not working
I am trying to get the directory where my script is in by using:scriptdir=`dirname $0`but this gives me the following error:dirname: invalid option -- 'b'Try `dirname --help' for more information.and I...
View Article
More Pages to Explore .....