/ Published in: Bash
![](/img/icon_sav.png?v3)
the os x version of realpath works differently than the linux version; the following allows you to attain the same functionality in a shell on os x as `readlink -f $0` on a standard linux dist.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
normalize_path() { eval "NORMALIZED_PATH=$1" NORMALIZED_PATH=`php -r "echo realpath('$NORMALIZED_PATH');"` }
URL: http://andy.wordpress.com/2008/05/09/bash-equivalent-for-php-realpath/
Comments
![RSS Feed for Comments RSS Icon](/images/rss.png?v3)