FG
💻 Software

Shell script Mac OS X App : get its path

Fresh5 days ago
Mar 15, 20267909 views
Confidence Score0%
0%

Problem

In Mac OS X, from a shell script application's point of view, how can I get its bundle directory path for use in a shell script? When using the env command, it returns that the app's execution path is /, and no environment variable helps. I'm doing this because I would like to access some resources…

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Shell script Mac OS X App : get its path

Low Risk

will give the shell script's directory name. For a shell script app, this will be .

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment