[CentOS] script to monitor device to output file