Hi, my hdd sometimes disconnects from the nas by itself, that doesnt bother me. What I want is to write a script to test it:
# ls /usb/sdb1/
ls: /usb/sdb1/: Transport endpoint is not connected
This shows up when the hdd disconnects, I wonder if how I can use an if statement to get it:
if [ "$output" == "ls: .: Transport endpoint is not connected" ] ; then
But there are no outputs.