On Thu, Dec 06, 2007 at 10:49:27AM -0700, Michael L Torrie wrote: > > then I need foo to be able to get a path that's the real, reduced path, > without any dots in it. In other words, `pwd`/../bar is not going to > work.
This is simple and dumb but seems pretty resilient. ######################################################################## #!/bin/bash # change `pwd` to `pwd -P` to remove symbolic links pushd `dirname "$1"` >&- absolute="`pwd`/`basename "$1"`" popd >&- echo $absolute ######################################################################## -- Andrew McNabb http://www.mcnabbs.org/andrew/ PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868 /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
