#!/bin/bash # Shell脚本部分 echo "开始执行Shell脚本" arm-linux-gnueabihf-gcc -lpthread -I ../libtq/include/tquart/ -I ../libtq/include/tqcommon/ -L ../libtq/lib -ltq detection_main.c predict.c svm.cpp -lm -lstdc++ -o detection_main # 嵌套Expect脚本部分 expect <<- EOF # Expect脚本内容 spawn scp ./detection_main root@192.168.1.102:/opt/svm_detection expect "*password:" send "embedsky\n" expect eof EOF echo "Shell脚本执行完毕"