- Analects (論語(ろんご))
Thursday, June 9, 2016
Bash: Posts Per Hour
Command (for this year's post per hour):
$ posts=`./smashingtheory_posts_this_year.sh`;doy=`date +%j`;hour=`date +%H`; echo "scale=4;$posts / ($doy * 24 + $hour)" | bc -l | tr '\n' ' '
Result:
.1248
Command (for this month's post per hour):
$ posts=`./smashingtheory_posts_this_month.sh`;dom=`date +%e`;hour=`date +%H`;echo "scale=4;$posts / ($dom * 24 + $hour)" | bc -l | tr '\n' ' '
Result:
.1710
$ posts=`./smashingtheory_posts_this_year.sh`;doy=`date +%j`;hour=`date +%H`; echo "scale=4;$posts / ($doy * 24 + $hour)" | bc -l | tr '\n' ' '
Result:
.1248
Command (for this month's post per hour):
$ posts=`./smashingtheory_posts_this_month.sh`;dom=`date +%e`;hour=`date +%H`;echo "scale=4;$posts / ($dom * 24 + $hour)" | bc -l | tr '\n' ' '
Result:
.1710
Wednesday, June 8, 2016
Blogger: Total Posts in This Month
Command:
$ curl -vs "http://smashingtheory.blogspot.jp" 2>&1 | grep -o -m 2 "<span class='post-count' dir='ltr'>([0-9]*)" | tail -1 | sed -e 's/[^[[:digit:]]]*//g'
Result:
33
$ curl -vs "http://smashingtheory.blogspot.jp" 2>&1 | grep -o -m 2 "<span class='post-count' dir='ltr'>([0-9]*)" | tail -1 | sed -e 's/[^[[:digit:]]]*//g'
Result:
33
ラベル:
Blogger (service),
cURL,
grep,
head (Unix),
sed,
tail (Unix)
Blogger: Total Posts in This Year
Command:
$ curl -vs "http://smashingtheory.blogspot.jp" 2>&1 | grep -o -m 1 "<span class='post-count' dir='ltr'>([0-9]*)" | sed -e 's/[^[[:digit:]]]*//g'
Result:
477
$ curl -vs "http://smashingtheory.blogspot.jp" 2>&1 | grep -o -m 1 "<span class='post-count' dir='ltr'>([0-9]*)" | sed -e 's/[^[[:digit:]]]*//g'
Result:
477
ラベル:
Bash (Unix shell),
Blogger (service),
cURL,
grep,
sed
並立(へいりつ)
品詞(ひんし) → 助詞(じょし) → 並立助詞(へいりつじょし)
- Japanese particles (助詞)
例:
- AとBとCとDとE。
- AやBやCやDやE。
- AかB。
ラベル:
Japanese particles,
Part of speech,
助詞,
品詞,
国語 (教科),
現代語
逆接語(ぎゃくせつご)
品詞(ひんし) → 接続詞(せつぞくし) → 逆接(ぎゃくせつ)
- Part of speech (品詞)
- Conjunction (grammar)(接続詞)
例:
- けれども
- しかし
ラベル:
Conjunction (grammar),
Part of speech,
品詞,
国語 (教科),
接続詞,
現代語
Subscribe to:
Posts (Atom)