切换工作目录到脚本所在目录
bash:
#!/usr/bin/env sh
cd $(dirname $0)
#cd $(dirname $(readlink $0)) #soft link
powershell:
$dir = Split-Path -Parent $MyInvocation.MyCommand.Definition
cd $dir
https://www.cnblogs.com/FlyFive/p/3640267.html
切换工作目录到脚本所在目录
bash:
#!/usr/bin/env sh
cd $(dirname $0)
#cd $(dirname $(readlink $0)) #soft link
powershell:
$dir = Split-Path -Parent $MyInvocation.MyCommand.Definition
cd $dir
https://www.cnblogs.com/FlyFive/p/3640267.html
相关文章: