Squeak scripts in UNIX

Norbert Hartl norbert at hartl.name
Thu Feb 15 10:51:22 UTC 2007


On Thu, 2007-02-15 at 11:39 +0100, Bert Freudenberg wrote:
> 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.
> 
Yes, you are right. I was again too quick and too lazy
at the same time ;)

Norbert




More information about the Squeak-dev mailing list