Detecting device in Range through Unix command line