[ale] How to expand to full-path name?

Tim Watts timtw at earthlink.net
Thu Aug 9 10:57:59 EDT 2007


Hi,

Suppose I have MyScript in /home/me/bin which does this:

	#!/bin/sh
	SCRIPT_HOME=`dirname $0`
	echo home=$SCRIPT_HOME

Now I run it from /home/me/bin which produces:

	home=.

How can I expand SCRIPT_HOME into the full path name (i.e. /home/me/bin)?



More information about the Ale mailing list