Linux Shell 相关记录

时间:2014-09-10 09:44:00   收藏:0   阅读:233

http://www.tutorialspoint.com/unix/unix-shell.htm

  1. Linux Shell 获取脚本的所在目录的绝对路径

    basedir=$(cd $(dirname $0); pwd;)
    echo $basedir

  2. shell 执行错误马上退出,而不是继续执行

    set -e

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!