I'm executing a script in lua:
os.execute("sh manager/scripts/update_system.sh" .. " " .. f)
And I want to get the output of the script( if exit status is 7 returns 7).
I tried
local output = os.execute("sh manager/scripts/update_system.sh" .. " " .. f)
print(output)
but it returns some weird numbers like 512
Any idea how to resolve this?
os.executereturn values are different on 5.1 and 5.2int os.execute(string)to{bool,string,int} os.execute(string), so let's just do a minor version bump to warn the users that every single line of code that uses that function and perform error checking will crash."