[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Get Scriptname Without the Path
- From: "steve donovan" <steve.j.donovan@...>
- Date: Thu, 3 Apr 2008 09:12:11 +0200
The point is that there is no single pattern that can match both Windows
and Unix style paths. I discover what OS I'm on by looking for Windows
specific environment variables, and adjust the pattern accordingly.
On Thu, Apr 3, 2008 at 12:04 AM, Miles Bader <firstname.lastname@example.org> wrote:
> "steve donovan" <email@example.com> writes:
> > The only really reliable method is not to use patterns; use
> > p:sub(i,i) for i = #p,1 and check for slash/backslash.
> > A similar problem involves finding extensions; Linux paths
> > are full of dots that don't mean extensions!
> Eh? Why do you think "the only reliable way is not to use patterns"?
> Neighbor, n. One whom we are commanded to love as ourselves, and who does all
> he knows how to make us disobedient.