[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Obtain the lua script's (absolute/real) dirname and file name from within the script itself.
- From: Sean Conner <sean@...>
- Date: Wed, 22 Jan 2020 02:17:57 -0500
It was thus said that the Great Hongyi Zhao once stated:
> Sean Conner <sean@conman.org> 于2020年1月22日周三 上午10:54写道:
> >
> > You can either just set cwd to "pwd", or
> ^^^^^
> Do you mean `cmd' here?
Yes, sorry about the typo.
> >
> > os.execute("pwd >/dev/null") -- adjust according to OS
> >
> > But that sill executes the command twice.
>
> If so, why you still suggest this method?
I made the assumption that you were doing os.execute("pwd") to see if the
program exists and can be executed.
-spc