Skip to content

Instantly share code, notes, and snippets.

@a-yasui
Last active Apr 3, 2020
Embed
What would you like to do?
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