就这样。他们只是不会为我工作。这次我做错了什么?
# nquo is: /home/bryan/renametest/C D/y z
# script:
dirn=dirname "$nquo"
echo "dirn $dirn"
bnam=basename "$nquo"
echo "bnam $bnam"
运行结果:
./script3.sh: 208: /home/bryan/renametest/C D/y z: Permission denied
dirn
./script3.sh: 208: /home/bryan/renametest/C D/y z: Permission denied
bnam