Skip to content

Instantly share code, notes, and snippets.

@tkuchiki
Created November 6, 2013 12:25
Show Gist options
  • Save tkuchiki/7335242 to your computer and use it in GitHub Desktop.
Save tkuchiki/7335242 to your computer and use it in GitHub Desktop.
実行したスクリプトのワーキングディレクトリを取得
#!/bin/sh
## /path/to/retrieve_working_directory.sh
DIR=`dirname $0`
echo $DIR # /path/to
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment