project_root_path = subprocess.run(f”echo \”$(dirname \”$(dirname \”$(readlink -f \”{__file__}\”)\”)\”)\””, shell=True, capture_output=True, text=True).stdout.strip()かproject_root_path = subprocess.run(f’echo “$(dirname “$(dirname “$(readlink -f “{__file__}”)”)”)”‘, shell=True, capture_output=True, text=True).stdout.strip()を使用することで、pythonのtranslateフォルダ内でプロジェクトのルートパスを取得できた

基本的にある人の主張はある視点から見たら正しいので、言い争いは他面的な視点を持てなかった人ということになり、言葉遣いが良くない人は内容が正しくてもある視点を持てていると感じさせにくい

ターミナルを移動して実行する方法(./test.sh)と、プロジェクトのルートで実行する方法(find . -type f -maxdepth 1 -name “test.sh”)と、エイリアスコマンドから実行する方法(test)があり、それぞれでpwdや$0、readlink -fを実行してみたい

©︎ 2025-2026 todo