macosx does not have /proc.
AIX has /proc but different contents, includes the app's basename (only) and cwd
$0 on AIX just gives the command used to invoke a script. Isn't it the same on linux. Isn't that why Fortran get arg 0 doesn't solve this problem.