Deprecated: Array and string offset access syntax with curly braces is deprecated in /mnt/hep_web/hep_web/member/n-kota/dokuwiki/inc/init.php on line 542
ja:bash:wanttodo1 [GiriWiki]

ユーザ用ツール

サイト用ツール


ja:bash:wanttodo1

scriptがあるディレクトリの絶対パスをとる

 FILE_DIR=$(cd $(dirname $BASH_SOURCE); pwd)
  • $BASH_SOURCE : scriptの絶対パス
  • cd しているが、scriptの処理が終わった後には元のdirectoryに戻っている
ja/bash/wanttodo1.txt · 最終更新: 2017/08/30 04:08 by kota