https://stackoverflow.com --> Stack Overflow - Where Developers Learn, Share, & Build Careers
https://cnn.com --> CNN International - Breaking News, US News, World News and Video
https://reddit.com --> reddit: the front page of the internet
https://archive.org --> Internet Archive: Digital Library of Free & Borrowable Books, Movies, Music & Wayback Machine
型
解释
tr "\n" " " # remove \n, create one line of input for sed
sed 's|.*<title>\([^<]*\).*</head>.*|\1|; # find <title> in <head>
s|^\s*||; # remove leading spaces
s|\s*$||' # remove trailing spaces
2条答案
按热度按时间wlzqhblo1#
你是说类似的事吗
wget_title_from_filelist.sh
字符串
filelist.txt
型
用法
型
输出
型
解释
型
6xfqseft2#
改进@utlox的答案,以处理具有属性(
<title k=v>
)的标题标签:字符串