dividuum / info-beamer

The Multimedia Presenter for Lua (for commercial projects, use info-beamer pi instead)
https://info-beamer.com/
Other
227 stars 48 forks source link

Get Raspberry Pi IP address #46

Closed RajshekharHoratti closed 7 years ago

RajshekharHoratti commented 7 years ago

Hello, I am new to lua programming and i was trying to get my raspberry pi's ip address from lua i tried using

os.execute('ifconfig wlan0 | grep "inet\ addr" | cut -d: -f2 | cut -d" " -f1') but getting an error.

invalid escape sequence near ''ifconfig wlan0 | grep "inet'

So is there any other way to get ip address from lua.

dividuum commented 7 years ago

What exactly are you trying to achieve? From the Lua runtime within info-beamer os.execute isn't available. My suggestion would be to either

RajshekharHoratti commented 7 years ago

Thanks a lot it worked..!! :)