{"id":452,"date":"2013-09-18T19:54:06","date_gmt":"2013-09-18T19:54:06","guid":{"rendered":"https:\/\/shan.info\/new\/linux-shell%e7%bc%96%e5%86%99%e4%bb%a5%e6%97%a5%e6%9c%9f%e6%97%b6%e9%97%b4%e4%b8%ba%e6%96%87%e4%bb%b6%e5%90%8d%e7%9a%84%e8%84%9a%e6%9c%ac\/"},"modified":"2013-09-18T19:54:06","modified_gmt":"2013-09-18T19:54:06","slug":"linux-shell%e7%bc%96%e5%86%99%e4%bb%a5%e6%97%a5%e6%9c%9f%e6%97%b6%e9%97%b4%e4%b8%ba%e6%96%87%e4%bb%b6%e5%90%8d%e7%9a%84%e8%84%9a%e6%9c%ac","status":"publish","type":"post","link":"https:\/\/shan.info\/new\/linux-shell%e7%bc%96%e5%86%99%e4%bb%a5%e6%97%a5%e6%9c%9f%e6%97%b6%e9%97%b4%e4%b8%ba%e6%96%87%e4%bb%b6%e5%90%8d%e7%9a%84%e8%84%9a%e6%9c%ac\/","title":{"rendered":"linux shell\u7f16\u5199\u4ee5\u65e5\u671f\u65f6\u95f4\u4e3a\u6587\u4ef6\u540d\u7684\u811a\u672c"},"content":{"rendered":"<p>&#8212;<\/p>\n<pre class=\"brush:powershell\">#!\/bin\/sh<br \/><br \/><\/pre>\n<p>a=`date +%Y-%m-%d-%H-%M-%S`<br \/>echo $a;<\/p>\n<p>a=`date +%Y-%m-%d-%Hh-%Mm-%Ss`<br \/>echo $a;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"brush:powershell\">#log\r\nMYDATE=`date +%d%m%y`\r\n#append MYDATE to the variable LOGFILE that holds the actual filename of the log\r\nLOGFILE=\/root\/test_log.$MYDATE\r\n#create the file\r\n&gt;$LOGFILE\r\nMYTIME=`date +%d%R`\r\nLOGFILE2=\/root\/test_logtime.$MYTIME\r\n#create the file\r\n&gt;$LOGFILE2<br \/><span style=\"font-size: small;\">&nbsp;<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&#8212; #!\/bin\/sh a=`date +%Y-%m-%d-%H-%M-%S`echo $a; a=`date +%Y-%m-%d-%Hh-%Mm-%Ss`echo $a; &nbsp; &nbsp; #log MYDATE=`date +%d%m%y` #append MYDATE to the variable LOGFILE that holds the actual filename of the log LOGFILE=\/root\/test_log.$MYDATE #create the file &gt;$LOGFILE MYTIME=`date +%d%R` LOGFILE2=\/root\/test_logtime.$MYTIME #create the file &gt;$LOGFILE2&nbsp;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[],"class_list":["post-452","post","type-post","status-publish","format-standard","hentry","category-centos-6"],"_links":{"self":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts\/452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/comments?post=452"}],"version-history":[{"count":0,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts\/452\/revisions"}],"wp:attachment":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/media?parent=452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/categories?post=452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/tags?post=452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}