<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://wiki.pjq.me/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>Welcome to Jianqing&#039;s Wiki - code:shell</title>
        <description></description>
        <link>https://wiki.pjq.me/</link>
        <lastBuildDate>Thu, 30 Apr 2026 12:35:28 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>https://wiki.pjq.me/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
            <title>Welcome to Jianqing&#039;s Wiki</title>
            <link>https://wiki.pjq.me/</link>
        </image>
        <item>
            <title>Use one command line to statistic the line of the code</title>
            <link>https://wiki.pjq.me/doku.php?id=code:shell:count-code-line&amp;rev=1462424823&amp;do=diff</link>
            <description>Use one command line to statistic the line of the code
/cygdrive/c/cygwin/bin/find ./ -iname &quot;*.java&quot; -exec cat {} +|grep -E -v &quot;^$|import&quot;|wc -l</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 05 May 2016 05:07:03 +0000</pubDate>
        </item>
        <item>
            <title>Fetch the pm 2.5 for all the cities in China</title>
            <link>https://wiki.pjq.me/doku.php?id=code:shell:fetchpm25&amp;rev=1462424823&amp;do=diff</link>
            <description>Fetch the pm 2.5 for all the cities in China

Get the pm 2.5 from &lt;http://www.soupm25.com&gt;

With this script you can get all the pm 2.5 in just one file “all_city/pm25_all.txt”, and it will auto backup the pm 2.5 in the directory “history”.

So have fun.

Before you can run it, you need install</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 05 May 2016 05:07:03 +0000</pubDate>
        </item>
        <item>
            <title>发送一条Twitter消息</title>
            <link>https://wiki.pjq.me/doku.php?id=code:shell:post-a-twitter&amp;rev=1462424823&amp;do=diff</link>
            <description>发送一条Twitter消息



#!/bin/sh

curl -d &quot;username=xxx&amp;password=xxx&amp;message=${@}&quot; -k https://216.24.xxx.xxx:8443/HelloServlet/s1/UpdateStatus



./twitter.sh &quot;post a tweet with twitter.sh&quot;
./twitter.sh &quot;`uptime`&quot;

Auto cut the length limit to 140:</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 05 May 2016 05:07:03 +0000</pubDate>
        </item>
        <item>
            <title>Weather to Twitter</title>
            <link>https://wiki.pjq.me/doku.php?id=code:shell:weather2twitter&amp;rev=1462424823&amp;do=diff</link>
            <description>Weather to Twitter



#!/bin/sh

weather_shanghai=`w3m -dump -no-cookie http://wap.weather.com.cn/wap/weather/101020100.shtml|grep -v &quot;^$&quot;|grep -v &quot;\[&quot;|head -n 5|tail -n 3|sed &#039;s/ //g&#039;`
msg=今日天气[上海]:${weather_shanghai}
#echo &quot;msg=${msg}&quot;

curl -d &quot;username=xxx&amp;password=xxx&amp;message=${msg}&quot; -k https://216.24.xxx.xxx:8443/HelloServlet/s1/UpdateStatus</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 05 May 2016 05:07:03 +0000</pubDate>
        </item>
    </channel>
</rss>
