Skip to content

Instantly share code, notes, and snippets.

@a-yasui
Last active April 3, 2020 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a-yasui/d598e524680798d6712e693b239052b1 to your computer and use it in GitHub Desktop.
Save a-yasui/d598e524680798d6712e693b239052b1 to your computer and use it in GitHub Desktop.
Work directory moving
#!/usr/bin/env bash
# スクリプトの設置ディレクトリに移動して、そのディレクトリパスを取得する
# :-$0 とする事で他のshellでも動くようになる
PWD="$( cd "$( dirname "${BASH_SOURCE:-$0}" )" && pwd )"
@a-yasui
Copy link
Author

a-yasui commented Apr 3, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment