2302月

可怜之人必有可恨之处

▧ 2008.02.23

cat title.txt|LANG=C sed -n ’s/.(.</em>)</title>.*/\1/ip;T;q' 日了.匹配中文必须有LANG=C</p> <p>开始还以为\1在sed里不支持呢.</p> <p><a href="http://sed.sourceforge.net/sed1line_zh-CN.html">sed的说明文档</a> </p> <p>还有正则表达式在各种工具中的的微小区别:</p> <p><strong><a href="http://blog.chinaunix.net/u/634/showart.php?id=2466">正则迷雾,各种工具之正则表达式语法比较</a> </strong></p> <p> </p> <p>LISTURL=“<a href="http://www.stdjtu.edu.cn/pingjian.asp%22">http://www.stdjtu.edu.cn/pingjian.asp"</a> LISTKEY=“pingjian.asp?newsid=[0-9]{4}” HREFFILE=“href.awk” PAGEURL=“<a href="http://www.stdjtu.edu.cn/admin/UploadFile/%22">http://www.stdjtu.edu.cn/admin/UploadFile/"</a> #<a href="http://www.stdjtu.edu.cn/admin/UploadFile/ea_2008222175027.rar">2.22…</a> PAGEKEY="/admin/UploadFile/ea_[0-9]+.rar” #a=(<code>curl -s http://www.stdjtu.edu.cn/pingjian.asp|grep 'pingjian.asp?newsid=[0-9]\{4\}'|awk -f href.awk</code>) a=(<code>curl -s $LISTURL|grep $LISTKEY|awk -f $HREFFILE</code>) #echo ${a[@]} for line in ${a[@]} do echo <a href="http://www.stdjtu.edu.cn/$line">http://www.stdjtu.edu.cn/$line</a> curl -s <a href="http://www.stdjtu.edu.cn/$line">http://www.stdjtu.edu.cn/$line</a> |grep “/admin/UploadFile/ea_[0-9]*.[a-z]{3}"|awk -f $HREFFILE done</p> <p>这里小记一下:)从头学shell真难受啊.旁边还没有好的书.好在这个东西就快完工了T_T 功能描述: crul抓取学校成绩发布页,自动下载相关文件(学校的服务器嗷嗷的慢)并且将相关信息提交给jiwai.实现短信提醒. 不过学校的成绩发布页也够那个了标签后面居然没有 非成对出现,看来程序大体功能完工以后还需要完善n多的细节问题.问题链接在下面 <a href="http://www.stdjtu.edu.cn/pingjian.asp?newsid=2026&back=1">http://www.stdjtu.edu.cn/pingjian.asp?newsid=2026&back=1</a> </p> <p>PS:昨天下雪了,今天刮风了.和一年前差不多.不同的是:一年前(阴历正月十六)我她在屋里.外面是风暴潮.现在只有我,外面也不可能有风暴潮了.感慨一下吧.最近周围很多分分和和的案例.大家都在不断的洗牌中.CCTV-6的想唱就唱不错.MM也不错.</p> </div><section id="comments" class="comments-note"><h2>关联记录</h2><p>暂无可公开显示的关联评论。评论与回复仍保存在本私有归档的 <code>comments/</code> 目录;阅读界面默认隐藏邮箱、IP 和用户代理信息。</p></section></div></article></section> <aside class="sidebar"> <section class="panel mood-panel"> <h2>今日心情</h2> <p>写新日记时,给它留一个轻轻的标记。</p> <div class="moods"><span>☀ 轻快</span><span>○ 平静</span><span>↗ 忙碌</span><span>☂ 低落</span><span>♢ 怀念</span></div> <a class="write-link" href="/write/">写下今天 →</a> </section> <section class="panel"> <h2>最近日志</h2> <ul class="compact-list"><li><a href="/posts/2017/2016%E5%B9%B4%E7%BB%88%E6%80%BB%E7%BB%93/">2016年终总结</a><time>01-21</time></li><li><a href="/posts/2014/%E4%B8%94%E8%A1%8C%E4%B8%94%E7%8F%8D%E6%83%9C/">且行且珍惜</a><time>12-07</time></li><li><a href="/posts/2014/2014%E4%B9%8B%E7%A7%8B/">2014之秋</a><time>10-25</time></li><li><a href="/posts/2014/%E5%90%8C%E6%A1%8C%E7%9A%84%E4%BD%A0/">同桌的你</a><time>06-22</time></li><li><a href="/posts/2014/2014-04-04-post-1118/">关于性格</a><time>04-04</time></li></ul> </section> <section class="panel"> <h2>主题</h2> <div class="tag-cloud"><span>>好习惯>依赖></span><span>>幸福></span><span>>某人></span><span>>爸爸>妈妈></span><span>>生气>原谅></span><span>>謝謝></span></div> </section> <section class="panel archive-panel"> <h2>光阴归档</h2> <ul><li><a href="/posts/">2017 年</a><small>1 篇</small></li><li><a href="/posts/">2014 年</a><small>6 篇</small></li><li><a href="/posts/">2013 年</a><small>14 篇</small></li><li><a href="/posts/">2012 年</a><small>9 篇</small></li><li><a href="/posts/">2011 年</a><small>29 篇</small></li><li><a href="/posts/">2010 年</a><small>86 篇</small></li><li><a href="/posts/">2009 年</a><small>61 篇</small></li><li><a href="/posts/">2008 年</a><small>176 篇</small></li><li><a href="/posts/">2007 年</a><small>145 篇</small></li><li><a href="/posts/">2006 年</a><small>155 篇</small></li><li><a href="/posts/">2005 年</a><small>107 篇</small></li><li><a href="/posts/">2004 年</a><small>78 篇</small></li><li><a href="/posts/">2003 年</a><small>3 篇</small></li></ul> </section> <div class="private-note">🔒 私人保存 · 仅自己可见</div> </aside> </div> <footer>光阴的故事 · 私人保存 · 仅自己可见</footer> </main> </div> </body> </html>