lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




Dear friends

I am using the Microsoft windows version of the extra putty software to telnet a UNIX machine

via extra putty software I got lua  code which checks if file exist on my windows harddisk (local machine)

code is:

	  local file = io.open(c:\\file.txt)
if file then
io.close(
c:\\file.txt)
return true
else
return false
end
end
 now i want to have lua code which checks if file exist on UNIX (remote machine) not local  , so is it possible to use the following code

remember i am running the lua script on windows and i am woundering if it  recognize  /usr/bin/script.s of the remote unix or not


code is :
  local file = io.open(/usr/bin/script.sh)
if file then
io.close(/usr/bin/script.sh)

return true
else
return false
end
end


plz send me the right way to do that

thank you


soly