将shell匹配出来的值,列在一行中,用空格隔开
#! /bin/bash
cd /root/script
curl -o 135.html
echo ==============`date`============== >> /root/script/rtmp135.txt
echo =======name====== >> /root/script/rtmp135.txt
name=`cat 135.html |grep "
" | grep -v live | grep -v real | awk -F "name>" '{print $2}'|awk -F "" '{print $1}'`
echo $name >> /root/script/rtmp135.txt
echo =======video====== >> /root/script/rtmp135.txt
video=`cat 135.html |grep "^" '{print $2}' |awk -F "<" '{print $1}'`
echo $video >> /root/script/rtmp135.txt
echo =======audio====== >> /root/script/rtmp135.txt
audio=`cat 135.html |grep "^" '{print $2}' |awk -F "<" '{print $1}'`
echo $audio >> /root/script/rtmp135.txt
阅读(875) | 评论(0) | 转发(0) |