{"id":2090,"date":"2015-04-26T12:05:48","date_gmt":"2015-04-26T04:05:48","guid":{"rendered":"http:\/\/ixyzero.com\/blog\/?p=2090"},"modified":"2018-06-02T20:39:30","modified_gmt":"2018-06-02T12:39:30","slug":"%e7%94%a8python%e5%92%8cawk%e8%bf%9b%e8%a1%8c%e6%97%a5%e5%bf%97%e5%88%86%e6%9e%90","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/2090.html","title":{"rendered":"\u7528Python\u548cAwk\u8fdb\u884c\u65e5\u5fd7\u5206\u6790"},"content":{"rendered":"<p>=Start=<\/p>\n<h4 id=\"id-\u6a21\u677f-\u7f18\u7531\uff1a\">\u7f18\u7531\uff1a<\/h4>\n<p>\u4e4b\u524d\u5c31\u505a\u8fc7\u7f51\u7ad9\u8bbf\u95ee\u65e5\u5fd7\u7684\u5206\u6790\uff0c\u5206\u522b\u7528\u7684\u662fawk\u548cPython\uff0c\u4f46\u90fd\u6bd4\u8f83\u7b80\u5355\uff0c\u53ea\u662f\u7b80\u5355\u9009\u53d6\u4e86IP\u7684\u7ef4\u5ea6\uff0c\u8fd8\u6ca1\u6709\u533a\u5206\u8bbf\u95ee\u7684\u65e5\u671f\uff0c\u8fd9\u6837\u7684\u8bdd\u5982\u679c\u67d0\u4e2aIP\u5728\u67d0\u4e00\u5929\u4e2d\u7684\u8bbf\u95ee\u6b21\u6570\u5f88\u591a\uff0c\u4f46\u5728\u5176\u5b83\u8fd9\u4e00\u6708\/\u5e74\u7ec8\u7684\u5176\u4ed6\u65f6\u5019\u8bbf\u95ee\u6b21\u6570\u4e0d\u591a\uff0c\u90a3\u5728\u5355\u7eaf\u53ea\u8003\u8651IP\u8bbf\u95ee\u6b21\u6570\u7684\u60c5\u51b5\u4e0b\u662f\u5f88\u96be\u786e\u5b9a\u8fd9\u6837\u7684IP\u7684\uff08\u800c\u8fd9\u6837\u7684IP\u53c8\u5f88\u6709\u53ef\u80fd\u662f\u722c\u866b\u6216\u662f\u653b\u51fb\u8005\u7684IP\uff09\uff0c\u56e0\u6b64\u9700\u8981\u52a0\u4e0a\u65f6\u95f4\u7ef4\u5ea6\uff0c\u4f46\u5982\u679c\u65f6\u95f4\u7ef4\u5ea6\u505a\u7684\u592a\u7ec6\uff0c\u6d88\u8017\u65f6\u95f4\u592a\u957f\uff1b\u5982\u679c\u505a\u7684\u592a\u7c97\u53c8\u4e0d\u5bb9\u6613\u53d1\u73b0\u95ee\u9898\uff1b\u6240\u4ee5\uff0c\u8fd9\u79cd\u60c5\u51b5\u4e0b\u9700\u8981\u6839\u636e\u5177\u4f53\u60c5\u51b5 &amp; \u5b9e\u9645\u9700\u8981\u6765\u9009\u53d6\u7c92\u5ea6\u3002\u56e0\u4e3a\u6211\u8fd9\u4e3b\u8981\u662f\u5404\u4eba\u5206\u6790\u7528\uff0c\u6240\u4ee5\u53ef\u4ee5\u4f7f\u7528\u7b80\u5355\u7684\u201c\u4ee5\u5929\u4e3a\u5355\u4f4d\u201d\u6765\u5206\u6790\uff0c\u7528\u5230\u4e86Python\u548cawk\u8fdb\u884c\u65e5\u5fd7\u5904\u7406\uff0c\u5feb\u901f\u65b9\u4fbf\uff1a<\/p>\n<p>\u9ed8\u8ba4\u7684Nginx\u8bb0\u5f55\u65e5\u5fd7\u7684\u683c\u5f0f\u4e3a\uff08\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u4ee5\u201c\u7a7a\u683c\u201d\u4e3a\u5206\u9694\u7b26\uff0c\u4f46\u5728\u771f\u5b9e\u60c5\u51b5\u4e0b\u662f\u4e0d\u5229\u4e8e\u65e5\u5fd7\u5206\u6790\u7684\uff0c\u4f46\u8fd9\u91cc\u4e3a\u4e86\u65b9\u4fbf\u8d77\u89c1\u8fd8\u662f\u4ee5\u9ed8\u8ba4\u7684\u4e3a\u793a\u4f8b\u8fdb\u884c\u8bf4\u660e\uff09\uff1a<\/p>\n<pre class=\"lang:default decode:true\">#log format\r\nlog_format access '$remote_addr\u00a0- $remote_user\u00a0[$time_local]\u00a0\"$request\" $status $body_bytes_sent \"$http_referer\" \"$http_user_agent\" $http_x_forwarded_for';<\/pre>\n<p>\u4ece\u65e5\u5fd7\u4e2d\u53d6\u4e00\u4e9b\u6837\u672c\u8fdb\u884c\u67e5\u770b\uff1a<\/p>\n<pre class=\"lang:default decode:true\"># head -3 access.log\r\n120.204.200.21 - - [25\/Apr\/2015:00:01:04 +0800] \"GET \/blog\/ HTTP\/1.1\" 200 9082 \"-\" \"DNSPod-Monitor\/2.0\" -\r\n50.116.30.23 - - [25\/Apr\/2015:00:01:05 +0800] \"GET \/blog\/feed HTTP\/1.1\" 304 0 \"-\" \"Superfeedr bot\/2.0\u00a0http:\/\/superfeedr.com\u00a0- Make your feeds realtime: get in touch - feed-id:128926078\" -\r\n209.15.21.92 - - [25\/Apr\/2015:00:01:26 +0800] \"HEAD \/blog\/ HTTP\/1.1\" 200 0 \"-\" \"-\" -<\/pre>\n<p>\u5148\u7528awk\u53d6\u51e0\u5217\u770b\u770b\uff1a<\/p>\n<pre class=\"lang:default decode:true\">$ cat access.log | awk '$3=\"-\" {print substr($4, 2, 11),$1}'\r\n$ cat access.log | awk '$3==\"-\" {print substr($4, 2, 11),$1}'<\/pre>\n<p>\u7528awk\u5bf9\u65e5\u5fd7\u8fdb\u884c\u5904\u7406\uff08\u6839\u636e\u201c\u65e5\u671f+IP\u201d\u8fdb\u884c\u53bb\u91cd\uff09\uff1a<\/p>\n<pre class=\"lang:default decode:true\">$ awk '{dict[substr($4, 2, 11)\"\\t\"$1]++}; END{for(item in dict) print item\"\\t\"dict[item]}' access.log<\/pre>\n<p>\u5bf9\u5927\u516c\u53f8\u6765\u8bf4\uff0c\u65e5\u5fd7\u662f\u4f1a\u6309\u65f6\u95f4\u6bb5\u8fdb\u884c\u5207\u5272\u7684\uff08\u8fd9\u4e2a\u51e0\u4e4e\u662f\u5fc5\u7136\u7684\uff0c\u5426\u5219\u8bbf\u95ee\u65e5\u5fd7\u8fc7\u5927\u7684\u8bdd\u5bb9\u6613\u5f15\u8d77\u5404\u79cd\u95ee\u9898\/\u9690\u60a3\uff09\uff0c\u5e76\u7528\u5904\u7406\u5927\u6570\u636e\u7684\u65b9\u6cd5\u5bf9\u65e5\u5fd7\u8fdb\u884c\u5904\u7406\uff08\u5176\u5b9e\u8fd9\u51e0\u53e5\u8bdd\u90fd\u662f\u5e9f\u8bdd\uff0c\u6211\u7684\u771f\u5b9e\u76ee\u7684\u662f\u60f3\u5f15\u51faHDFS\u548c\u7b80\u5355\u7684Streaming\uff09\u2026\u2026<\/p>\n<h4 id=\"id-\u6a21\u677f-\u6b63\u6587\uff1a\">\u6b63\u6587\uff1a<\/h4>\n<p>\u5e9f\u8bdd\u4e0d\u591a\u8bf4\uff0c\u901a\u8fc7awk\u5bf9\u65e5\u5fd7\u8fdb\u884c\u5904\u7406\u4e86\u4e4b\u540e\uff0c\u8bb0\u5f55\u7684\u6587\u4ef6\u5185\u5bb9\u683c\u5f0f\u4e3a\uff1a<\/p>\n<p>date IP count<\/p>\n<p>\u7136\u540e\u901a\u8fc7\u5bf9\u5904\u7406\u540e\u7684\u6587\u4ef6\u518d\u8fdb\u884c\u5206\u6790\u4ece\u800c\u5f97\u5230\u6211\u4eec\u60f3\u8981\u7684\u5404\u79cd\u7ed3\u679c\uff1a<\/p>\n<ul>\n<li>#\u67d0\u4e00\u5929\u7684IP\u8bbf\u95ee\u603b\u91cf\uff08PV\uff09<\/li>\n<li>#\u67d0\u4e00\u5929\u7684\u72ec\u7acbIP\u8bbf\u95ee\u603b\u91cf\uff08UV\uff09<\/li>\n<li>#\u603bIP\u8bbf\u95ee\u91cf\u7684\u6392\u5e8f\uff08\u6309IP\u8bbf\u95ee\u91cf\u53d6top\uff09<\/li>\n<li>#\u67d0\u4e00\u6307\u5b9aIP\u5728\u6bcf\/\u67d0\u4e00\u5929\u7684\u8bbf\u95ee\u91cf\uff08\u5bf9IP\u8fdb\u884c\u53bb\u91cd\u8ba1\u6570\uff09<\/li>\n<li>\u2026\u5f85\u6dfb\u52a0\u2026<\/li>\n<\/ul>\n<p>\u8fd9\u91cc\u9700\u8981\u7528\u5230\u4e8c\u7ef4\u6570\u7ec4\u7684\u77e5\u8bc6\uff08\u5982\u679c\u9700\u8981\u589e\u52a0\u66f4\u591a\u7684\u5206\u6790\u7ef4\u5ea6\uff0c\u90a3\u5c31\u9700\u8981\u591a\u7ef4\u6570\u7ec4\u4e86\uff09\uff0c\u4f46Python\u91cc\u9762\u7684\u4e8c\u7ef4\u6570\u7ec4\u7528\u7684\u5c11\uff08\u8c8c\u4f3c\u4e3b\u8981\u662f\u505a\u79d1\u7814\u7684\u7528 NumPy \u5e93\u548c\u4e00\u4e9b\u5176\u4ed6\u7684\u4e13\u7528\u5e93\uff09\uff0c\u53bbstackoverflow\u4e0a\u641c\u4e86\u4e00\u5806\u611f\u89c9\u90a3\u79cd\u4e8c\u7ef4\u6570\u7ec4\u4e0d\u662f\u6211\u60f3\u8981\u7684\uff1a<\/p>\n<h6>\u641c\u7d22\u5173\u952e\u5b57\uff1a<\/h6>\n<ul>\n<li>python\u00a0\u4e8c\u7ef4\u6570\u7ec4<\/li>\n<li>python two dimensional array<\/li>\n<li>python create dynamic two dimensional array<\/li>\n<\/ul>\n<h6>\u53c2\u8003\u94fe\u63a5\uff1a<\/h6>\n<ul>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/6667201\/how-to-define-two-dimensional-array-in-python\">http:\/\/stackoverflow.com\/questions\/6667201\/how-to-define-two-dimensional-array-in-python<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/3890621\/how-does-multiplication-differ-for-numpy-matrix-vs-array-classes\/\">http:\/\/stackoverflow.com\/questions\/3890621\/how-does-multiplication-differ-for-numpy-matrix-vs-array-classes\/<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/2397141\/how-to-initialize-a-two-dimensional-array-in-python\">http:\/\/stackoverflow.com\/questions\/2397141\/how-to-initialize-a-two-dimensional-array-in-python<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/6673006\/how-to-define-a-dynamic-two-dimensional-array-in-python\">http:\/\/stackoverflow.com\/questions\/6673006\/how-to-define-a-dynamic-two-dimensional-array-in-python<\/a><\/li>\n<li><a href=\"http:\/\/www.geek521.com\/?p=3621\" target=\"_blank\" rel=\"noopener\">Python\u4e00\u7ef4\u6570\u7ec4\u8f6c\u4e8c\u7ef4\u6570\u7ec4<\/a><\/li>\n<li><a href=\"http:\/\/blog.csdn.net\/hzqnju\/article\/details\/6639029\" target=\"_blank\" rel=\"noopener\">Python\u521b\u5efa\u4e8c\u7ef4\u6570\u7ec4<\/a><\/li>\n<li><a href=\"http:\/\/www.cnblogs.com\/btchenguang\/archive\/2012\/01\/30\/2332479.html\" target=\"_blank\" rel=\"noopener\">python\u7684\u4e8c\u7ef4\u6570\u7ec4\u64cd\u4f5c<\/a><\/li>\n<li><a href=\"http:\/\/taizilongxu.gitbooks.io\/stackoverflow-about-python\/content\/57\/README.html\" target=\"_blank\" rel=\"noopener\">\u5b57\u5178\u63a8\u5bfc\u5f0f\u00a0| Stackoverflow about Python<\/a><\/li>\n<li><a href=\"http:\/\/pyzh.readthedocs.org\/en\/latest\/improving-your-python-productivity.html#id1\" target=\"_blank\" rel=\"noopener\">(\u8bd1)\u63d0\u9ad8\u4f60\u7684Python\u7f16\u7801\u6548\u7387<\/a><\/li>\n<\/ul>\n<p>==<\/p>\n<p>\u4e4b\u524d\u5199\u53e6\u5916\u4e00\u4e2a\u4e1c\u897f\u7684\u65f6\u5019\u7528\u4e86\u5d4c\u5957\u7684dict\u4ee3\u66ff\u4e8c\u7ef4\u6570\u7ec4\uff08list\uff09\uff0c\u633a\u597d\u7528\u7684\uff0c\u8fd9\u6b21\u5c31\u4f9d\u846b\u82a6\u753b\u74e2\uff0c\u6574\u4e86\u4e2a\u7c7b\u4f3c\u7684\uff1a<\/p>\n<pre class=\"lang:default decode:true\">#!\/usr\/bin\/env python\r\n# coding=utf-8\r\nimport sys, re\r\n\r\ndate_ip_x = {}\r\npv_of_date = {}\r\nuv_of_date = {}\r\nfor line in sys.stdin:\r\n    line = line.strip()\r\n    res = re.split(\" \", line)\r\n    ip = res[0].strip()\r\n    date = res[3].strip()[1:12]\r\n\r\n    if date in date_ip_x:\r\n        if ip in date_ip_x[date]:\r\n            date_ip_x[date][ip] += 1\r\n        else:\r\n            date_ip_x[date][ip] = 1\r\n    else:\r\n        date_ip_x[date] = {ip:1}\r\n\r\nfor date in date_ip_x:\r\n    pv_of_date[date] = len(date_ip_x[date])\r\n#pv_of_date = {date:len(date_ip_x[date]) for date in date_ip_x}\r\n\r\nfor date in date_ip_x:\r\n    uv_of_date[date] = 0\r\n    for ip in date_ip_x[date]:\r\n        uv_of_date[date] += date_ip_x[date][ip]\r\n\r\nprint date_ip_x\r\nprint pv_of_date\r\nprint uv_of_date\r\n\r\nwith open(\"date_ip_count.txt\", 'w') as f:\r\n    for date in date_ip_x:\r\n        f.write('%s\\n' % date)\r\n        for ip in date_ip_x[date]:\r\n            f.write('%s\\t%d\\n' % (ip, date_ip_x[date][ip]))\r\n        f.write('\\n')\r\n\r\nwith open(\"date_pv_uv.txt\", 'w') as f:\r\n    f.write('\\n####PV_of_date####\\n')\r\n    for date in pv_of_date:\r\n        f.write('%s\\t%d\\n' % (date, pv_of_date[date]))\r\n    f.write('\\n####UV_of_date####\\n')\r\n    for date in uv_of_date:\r\n        f.write('%s\\t%d\\n' % (date, uv_of_date[date]))<\/pre>\n<p>\u6839\u636e\u4ee5\u4e0a\u7684\u51e0\u4e2a\u6b65\u9aa4\u5904\u7406\u4e86\u4e4b\u540e\uff0c\u5c31\u53ef\u4ee5\u5f97\u5230\u6211\u4eec\u60f3\u8981\u7684\u6570\u636e\u4e86~~<\/p>\n<h6>\u53c2\u8003\u94fe\u63a5\uff1a<\/h6>\n<ul>\n<li><a href=\"http:\/\/search.aol.com\/aol\/search?q=python+traverse+nested+dictionary\">python traverse nested dictionary &#8211; AOL Search Results<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/10756427\/loop-through-all-nested-dictionary-values\">python &#8211; Loop through all nested dictionary values? &#8211; Stack Overflow<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/3294889\/iterating-over-dictionaries-for-loops-in-python?rq=1\">dictionary &#8211; Iterating over Dictionaries&#8230;For Loops in Python &#8211; Stack Overflow<\/a><\/li>\n<li><a href=\"http:\/\/desk.stinkpot.org:8080\/tricks\/index.php\/2006\/04\/create-a-double-dictionary-in-python\/\">create a double dictionary in python \u00bb from the desk of stinkpot<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/8711794\/generic-way-to-create-nested-dictionary-from-flat-list-in-python\">Generic way to create nested dictionary from flat list in python &#8211; Stack Overflow<\/a><\/li>\n<li><a href=\"http:\/\/ixyzero.com\/blog\/archives\/1332.html\">Python\u77e5\u8bc6\u79ef\u7d2f_0 | ASPIRE<\/a><\/li>\n<li><a href=\"http:\/\/ixyzero.com\/blog\/archives\/1088.html\">\u4e00\u9053\u601d\u8003\u9898_0 | ASPIRE<\/a><\/li>\n<li><a href=\"https:\/\/docs.python.org\/2\/library\/stdtypes.html#dict.setdefault\"> Built-in Types \u2014 Python 2.7.9 documentation<\/a><\/li>\n<li><a href=\"http:\/\/www.pasteur.fr\/formation\/infobio\/python\/ch10.html\">Chapter 10. Nested data structures<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/635483\/what-is-the-best-way-to-implement-nested-dictionaries-in-python\">data structures &#8211; What is the best way to implement nested dictionaries in Python? &#8211; Stack Overflow<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/15819428\/how-to-initialize-nested-dictionaries-in-python?rq=1\">dictionary &#8211; How to initialize nested dictionaries in Python &#8211; Stack Overflow<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/4841868\/python-dictionaries-how-to-keep-the-new-value-from-overwriting-the-previous-valu\">nested &#8211; Python dictionaries-How to keep the new value from overwriting the previous value? &#8211; Stack Overflow<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/575819\/sorting-dictionary-keys-in-python?lq=1\">Sorting dictionary keys in python &#8211; Stack Overflow<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/14692690\/access-python-nested-dictionary-items-via-a-list-of-keys\">Access python nested dictionary items via a list of keys &#8211; Stack Overflow<\/a><\/li>\n<li><a href=\"http:\/\/www.ibm.com\/developerworks\/cn\/linux\/l-cn-python-optim\/\">Python \u4ee3\u7801\u6027\u80fd\u4f18\u5316\u6280\u5de7<\/a><\/li>\n<li><a href=\"http:\/\/blog.csdn.net\/zhanh1218\/article\/details\/26590837\">Python\u9ad8\u7ea7\u7279\u6027\u4e4b\uff1aList Comprehensions\u3001Generator\u3001Dictionary and set comprehensions<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/4841868\/python-dictionaries-how-to-keep-the-new-value-from-overwriting-the-previous-valu\">nested &#8211; Python dictionaries-How to keep the new value from overwriting the previous value?\u00a0&#8211; Stack Overflow<\/a><\/li>\n<li><a href=\"http:\/\/search.aol.com\/aol\/search?s_it=topsearchbox.search&amp;s_chn=prt_aol20-ns&amp;v_t=comsearch&amp;q=Python+Recursive+remove+nested+dict\">Python Recursive remove nested dict &#8211; AOL Search Results<\/a><\/li>\n<li><a href=\"http:\/\/www.saltycrane.com\/blog\/2011\/10\/some-more-python-recursion-examples\/\">Some more python recursion examples &#8211; SaltyCrane Blog<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/20558699\/python-how-recursively-remove-none-values-from-a-nested-data-structure-lists-a\">Python: How RECURSIVELY remove None values from a NESTED data structure (lists and dictionaries)? &#8211; Stack Overflow<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/5384914\/deleting-items-from-a-dictionary-while-iterating-over-it?lq=1\">scripting &#8211; deleting items from a dictionary while iterating over it &#8211; Stack Overflow<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/3405715\/elegant-way-to-remove-fields-from-nested-dictionaries\">python &#8211; Elegant way to remove fields from nested dictionaries &#8211; Stack Overflow<\/a><\/li>\n<li><a href=\"http:\/\/search.aol.com\/aol\/search?enabled_terms=&amp;s_it=comsearch&amp;q=Python+nested+dict+length&amp;s_chn=prt_aol20-ns\">Python nested dict length &#8211; AOL Search Results<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/26411999\/how-to-get-keys-from-nested-dictionary-of-arbitrary-length-in-python\">recursion &#8211; How to get keys from nested dictionary of arbitrary length in Python &#8211; Stack Overflow<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/4581646\/how-to-count-all-elements-in-a-nested-dictionary\">python &#8211; How to count all elements in a nested dictionary? &#8211; Stack Overflow<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/3195982\/reading-writing-a-list-of-nested-dictionaries-to-from-a-csv-file-python\">Reading\/writing a list of nested dictionaries to\/from a CSV file (Python) &#8211; Stack Overflow<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/21560433\/how-to-write-a-nested-dictionary-to-json\">python &#8211; How to write a nested dictionary to json &#8211; Stack Overflow<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/17224844\/in-python-how-do-i-write-the-contents-of-nested-dictionaries-to-a-file-in-a-cer\">output &#8211; In Python, how do I write the contents of nested dictionaries to a file in a certain format? &#8211; Stack Overflow<\/a><\/li>\n<\/ul>\n<p>=END=<\/p>\n","protected":false},"excerpt":{"rendered":"<p>=Start= \u7f18\u7531\uff1a \u4e4b\u524d\u5c31\u505a\u8fc7\u7f51\u7ad9\u8bbf\u95ee\u65e5\u5fd7\u7684\u5206\u6790\uff0c\u5206\u522b\u7528\u7684\u662fawk\u548cPython\uff0c\u4f46\u90fd\u6bd4\u8f83\u7b80\u5355\uff0c\u53ea\u662f\u7b80\u5355\u9009 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,11,7,12],"tags":[74,494,8],"class_list":["post-2090","post","type-post","status-publish","format-standard","hentry","category-knowledgebase-2","category-linux","category-programing","category-tools","tag-awk","tag-nested","tag-python"],"views":4701,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/2090","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/comments?post=2090"}],"version-history":[{"count":2,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/2090\/revisions"}],"predecessor-version":[{"id":3954,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/2090\/revisions\/3954"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=2090"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=2090"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=2090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}