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

Warren Myers volcimaster at gmail.com
Thu Aug 9 11:02:15 EDT 2007


this should work:

#!/bin/sh
SCRIPT_HOME=`pwd`
echo $SCRIPT_HOME

-wmm

On 8/9/07, Tim Watts <timtw at earthlink.net> wrote:
>
> 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)?
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>



-- 
http://warrenmyers.com
"God may not play dice with the universe, but something strange is going on
with the prime numbers." --Paul Erd?s
"It's not possible. We are the type of people who have everything in our
favor going against us." --Ben Jarhvi, Short Circuit 2
-------------- next part --------------
An HTML attachment was scrubbed...




More information about the Ale mailing list