Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
環境変数 admin_path=/home/myfolder/server があります。ここで、シェル スクリプトの $admin_path に基づく親パスを取得する必要があります。どうすれば簡単に入手できますか?ありがとうございました
It's not entirely clear what you want, but I think you are looking for:
${admin_path%/*}
to get the value of admin_path with the trailing path component removed.
admin_path