I am new to Shell command, can anyone help me about these two lines of Shell command.
filepath=$(cd "$(dirname "$0")"; pwd)
file_1=$(echo -e "${filepath}"|awk -F "$0" '{print $1}')
I have tried in my (KVM) VPS, but show like this:
[root@v97123 ~]# filepath=$(cd "$(dirname "$0")"; pwd)
dirname: invalid option -- 'b'
Try 'dirname --help' for more information.