Skip to content

Instantly share code, notes, and snippets.

@Twwy
Created February 26, 2015 08:20
Show Gist options
  • Select an option

  • Save Twwy/d5944bef6d2056bd9c12 to your computer and use it in GitHub Desktop.

Select an option

Save Twwy/d5944bef6d2056bd9c12 to your computer and use it in GitHub Desktop.

Revisions

  1. Twwy revised this gist Feb 26, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion shell.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    获取脚本当前执行的路径

    path=$(cd "$(dirname "$0")"; pwd)
    path=$(cd "$(dirname "$0")"; pwd)
  2. Twwy revised this gist Feb 26, 2015. No changes.
  3. Twwy revised this gist Feb 26, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions shell.md
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,3 @@
    获取脚本当前执行的路径

    path=$(cd "$(dirname "$0")"; pwd)
  4. Twwy created this gist Feb 26, 2015.
    2 changes: 2 additions & 0 deletions shell.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    获取脚本当前执行的路径
    path=$(cd "$(dirname "$0")"; pwd)