dhleong / ps4-waker

Wake your PS4 over LAN (with help from the Playstation App)
MIT License
451 stars 40 forks source link

Suppress Output #148

Closed typkrft closed 3 years ago

typkrft commented 3 years ago

This may seem like an odd request, but I am polling the exit codes of the check command to determine the status of a playstation that is on my wifi network. It seems to find it inconsistently. I'd say 1 out of every 10 tries fails. It's not a huge deal, but I'd like to suppress the "Could not detect any matching PS4 device" output and have it fail silently. This is because the script I wrote in conjunction with the software I am using causes it fail when this is output. I've tried to > /dev/null which suppresses the JSON, but does not suppress the "Could Not Detect" message.

Thanks for this! Any help is appreciated.

typkrft commented 3 years ago

ps4-waker check -d xxx.xxx.x.xxx >&- 2>&- Seems to do the trick.