Squeak scripts in UNIX

Bert Freudenberg bert at freudenbergs.de
Thu Feb 15 10:39:39 UTC 2007


On Feb 15, 2007, at 10:40 , Norbert Hartl wrote:

> On Wed, 2007-02-14 at 15:12 -0500, Lex Spoon wrote:
>> Maybe the easiest thing, then, is to come up with some
>> shell-script magic to rewrite $0 into an absolute path.  Do any Unix
>> hackers here know how to do that?
>>
> $PWD/$0
>
> always resemble an absolute path.

But the wrong one in case $0 is already absolute.

In C you have realpath(), but in the shell I think you must test for  
the path being absolute or not.

- Bert -





More information about the Squeak-dev mailing list