エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
How to get absolute path name of shell script on MacOS?
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
How to get absolute path name of shell script on MacOS?
readlink -f does not exist on MacOS. The only working solution for Mac OS I managed to find on th... readlink -f does not exist on MacOS. The only working solution for Mac OS I managed to find on the net goes like this: if [[ $(echo $0 | awk '/^\//') == $0 ]]; then ABSPATH=$(dirname $0) else ABSPATH=$PWD/$(dirname $0) fi Can anyone suggest anything more elegant to this seemingly trivial task?

