awk

cat test1.txt | awk '{print "select videoid from video where infohash=""'\''"$1"'\'';"}' > movieid.txt

 

mysql -h192.168.1.15 -uroot  --column-names=false < movieid.txt > movie.txt

 

cat movie.txt | sort -n | uniq | wc -l

你可能感兴趣的:(mysql)