奇妙な風景 Unique Scene

旅行好きな管理人が旅先で出会った奇妙な景色の写真をアップしていく、 ただそれだけのブログ.....のはずがもう完全に自分用技術メモ
201502
※記事タイトルにマウスカーソルをあてると、概要が読みやすくなります。
-
MyDNSへのIP通知のスクリプト
#!/bin/sh##Update IPv4 address to mydns.tmpfile=tmp.$$##Fetch only IP address into tmpfilecurl -s [IP_checking_site] | egrep -o "[0-9]{1,3}(\.[0-9]{1,3}){3}" > $tmpfile##Set variables from tmpfileset $(cat $tmpfile)ipaddr=$1mid=[ID]passwd=[PASSWD]##Double quotation is needed in order to evaluate variables.curl "www.mydns.jp/directip.html?MID=${mid}&PWD=${passwd}&IPV4ADDR=${ipaddr}"rm -rf $tmpfileM... (2015/02/16:>Bash) -
grepで複数のキーワードを検索するには
grep "keyword1\|keyword2" sample.txt上記はOR条件になります。... (2015/02/15:>Linux)
Copyright©:
Articles by トニヒコ
Sup.byM,
anannanCarendarchive by Pcafe,
Powerd by FC2 Blog