[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] How to expand to full-path name?
- Subject: [ale] How to expand to full-path name?
- From: volcimaster at gmail.com (Warren Myers)
- Date: Thu, 9 Aug 2007 11:02:15 -0400
- In-reply-to: <[email protected]>
- References: <[email protected]>
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...