Var pw As New Shell
pw.Execute(“grep ‘wpa_passphrase’ /etc/hostadp/hostapd.conf | cut -c16-”)
The Shell result is ‘No such file or directory’.
If I run grep ‘wpa_passphrase’ /etc/hostadp/hostapd.conf | cut -c16- directly in a terminal on a Raspberry pi I get the result I want.
probably because the shell isnt rooted where you think it is
its not a “terminal” so things like paths etc are NOT configure the same as when you run in a terminal window
you may even need to use an absolute path to grep
try using absolute paths to grep and the wpa_passphrase file
It is an odd one, because this works: -
cat /etc/hostapd/hostapd.conf | grep ‘wpa_passphrase’ | cut -c16-