2014年1月27日

摘要: $ date +"FORMAT"now=$(date +"%Y-%m-%d-%S")filename="my_program.$now.log"# example filename: my_program.2012-01-23-47.lognow=$(date +"%Y.%m.%d.%S.%N")filename="my_program.$now.log"# example filename: my_program.2013.01.23.44.364617000.lognow=$(date +& 阅读全文
posted @ 2014-01-27 21:46 菲一打 阅读(202) 评论(0) 推荐(0)
 
摘要: ip route show | grep 'default' | awk '{print $3}'#vim getgw.sh#!/bin/shdefault_gateway_ip=`ip route show | grep 'default' | awk '{print $3}'`echo $default_gateway_ip 阅读全文
posted @ 2014-01-27 21:15 菲一打 阅读(365) 评论(0) 推荐(0)
 
摘要: $ curl ifconfig.me$ curl icanhazip.com$ curl ident.me$ curl ipecho.net/plain$ curl whatismyip.akamai.com$ curl tnx.nl/ip$ curl myip.dnsomatic.com$ curl ip.appspot.com$ curl -s checkip.dyndns.org | sed 's/.*IP Address: \([0-9\.]*\).*/\1/g'转自:http://xmodulo.com/2013/04/how-to-find-the-public-i 阅读全文
posted @ 2014-01-27 21:10 菲一打 阅读(13407) 评论(0) 推荐(1)