shell腳本判斷/dev/ttyUSB0是否存在

插入3G上網卡以後要使用shell判斷設備節點是否存在,/dev/ttyUSB0輸入字符設備,實現代碼以下:shell #!/bin/shsocket echo "Find /dev/ttyUSB0......."spa if [ -c /dev/ttyUSB0]; thenip        echo "the /dev/ttyUSB0 is exist"ci elseterminal     
相關文章
相關標籤/搜索