shell for循环读取IP.txt中的IP地址

for x in $(car ip.txt) ; do

    echo 'hello world'

done

ssh root@$ip "cat sys.log | grep 'VGA' | awk '{print \$1}' ; gpus=\$(lspci | grep 'AMD' | grep 'VGA' | awk -F':' '{print \$1}'); for x in \$gpus; do ./cmd -c gpu\$x.log &; done"

posted @ 2024-09-14 09:07  Foxnnn_DK  阅读(6)  评论(0编辑  收藏  举报