一分钟聊聊Linux命令行

意外得到了电视节目的源?用#,%,ping 过滤掉过期的源


Listen Later

cat 节目源.txt | while read line ; do tmp=${line#*://}; host=${tmp%%/*}; hostnoport=${host%:*}; ping -c 1 $hostnoport; if [ 0 -eq $? ]; then echo $line >>tvpinged.txt;fi;  done

...more
View all episodesView all episodes
Download on the App Store

一分钟聊聊Linux命令行By 叮宕

  • 5
  • 5
  • 5
  • 5
  • 5

5

1 ratings