Skip to content

Instantly share code, notes, and snippets.

Last active Apr 3, 2020
What would you like to do?
Work directory moving
#!/usr/bin/env bash
# スクリプトの設置ディレクトリに移動して、そのディレクトリパスを取得する
# :-$0 とする事で他のshellでも動くようになる
PWD="$( cd "$( dirname "${BASH_SOURCE:-$0}" )" && pwd )"
Copy link

a-yasui commented Apr 3, 2020

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