{"id":2046,"date":"2015-03-28T16:57:46","date_gmt":"2015-03-28T08:57:46","guid":{"rendered":"http:\/\/ixyzero.com\/blog\/?p=2046"},"modified":"2015-03-28T16:57:46","modified_gmt":"2015-03-28T08:57:46","slug":"bash%e7%9a%84%e5%8f%82%e6%95%b0%e5%92%8c%e5%8f%82%e6%95%b0%e6%89%a9%e5%b1%95%e7%9b%b8%e5%85%b3%e7%9f%a5%e8%af%86","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/2046.html","title":{"rendered":"Bash\u7684\u53c2\u6570\u548c\u53c2\u6570\u6269\u5c55\u76f8\u5173\u77e5\u8bc6"},"content":{"rendered":"<p>\u4e0d\u5199\u591a\u4f59\u7684\u5185\u5bb9\uff0c\u53ea\u653e3\u5f20\u8868\u683c\uff0c\u4e00\u76ee\u4e86\u7136\uff1a<\/p>\n<table width=\"554\">\n<tbody>\n<tr>\n<td colspan=\"2\" width=\"554\">\n<h5 style=\"text-align: center;\"><span style=\"color: #ff0000;\"><strong>\u51fd\u6570\u7684 Shell \u53c2\u6570<\/strong><\/span><\/h5>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"38\">\u53c2\u6570<\/td>\n<td width=\"516\">\u76ee\u7684<\/td>\n<\/tr>\n<tr>\n<td width=\"38\">0, 1, 2, &#8230;<\/td>\n<td width=\"516\">\u4f4d\u7f6e\u53c2\u6570\u4ece\u53c2\u6570 0 \u5f00\u59cb\u3002\u53c2\u6570 0 \u5f15\u7528\u542f\u52a8 bash \u7684\u7a0b\u5e8f\u7684\u540d\u79f0\uff0c\u5982\u679c\u51fd\u6570\u5728 shell \u811a\u672c\u4e2d\u8fd0\u884c\uff0c\u5219\u5f15\u7528 shell \u811a\u672c\u7684\u540d\u79f0\u3002\u6709\u5173\u8be5\u53c2\u6570\u7684\u5176\u4ed6\u4fe1\u606f\uff0c\u6bd4\u5982 bash \u7531 -c \u53c2\u6570\u542f\u52a8\uff0c\u8bf7\u53c2\u9605 bash \u624b\u518c\u9875\u9762\u3002\u7531\u5355\u5f15\u53f7\u6216\u53cc\u5f15\u53f7\u5305\u56f4\u7684\u5b57\u7b26\u4e32\u88ab\u4f5c\u4e3a\u4e00\u4e2a\u53c2\u6570\u8fdb\u884c\u4f20\u9012\uff0c\u4f20\u9012\u65f6\u4f1a\u53bb\u6389\u5f15\u53f7\u3002 \u5982\u679c\u662f\u53cc\u5f15\u53f7\uff0c\u5219\u5728\u8c03\u7528\u51fd\u6570\u4e4b\u524d\u5c06\u5bf9 $HOME \u4e4b\u7c7b\u7684 shell \u53d8\u91cf\u8fdb\u884c\u6269\u5c55\u3002\u5bf9\u4e8e\u5305\u542b\u5d4c\u5165\u7a7a\u767d\u6216\u5176\u4ed6\u5b57\u7b26\uff08\u8fd9\u4e9b\u7a7a\u767d\u6216\u5b57\u7b26\u53ef\u80fd\u5bf9 shell \u6709\u7279\u6b8a\u610f\u4e49\uff09\u7684\u53c2\u6570\uff0c\u9700\u8981\u4f7f\u7528\u5355\u5f15\u53f7\u6216\u53cc\u5f15\u53f7\u8fdb\u884c\u4f20\u9012\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"38\">*<\/td>\n<td width=\"516\">\u4f4d\u7f6e\u53c2\u6570\u4ece\u53c2\u6570 1 \u5f00\u59cb\u3002\u5982\u679c\u5728\u53cc\u5f15\u53f7\u4e2d\u8fdb\u884c\u6269\u5c55\uff0c\u5219\u6269\u5c55\u5c31\u662f\u4e00\u4e2a\u8bcd\uff0c\u7531 IFS \u7279\u6b8a\u53d8\u91cf\u7684\u7b2c\u4e00\u4e2a\u5b57\u7b26\u5c06\u53c2\u6570\u5206\u5f00\uff0c\u5982\u679c IFS \u4e3a\u7a7a\uff0c\u5219\u6ca1\u6709\u95f4\u9694\u7a7a\u683c\u3002IFS \u7684\u9ed8\u8ba4\u503c\u662f\u7a7a\u767d\u3001\u5236\u8868\u7b26\u548c\u6362\u884c\u7b26\u3002\u5982\u679c\u6ca1\u6709\u8bbe\u7f6e IFS\uff0c\u5219\u4f7f\u7528\u7a7a\u767d\u4f5c\u4e3a\u5206\u9694\u7b26\uff08\u4ec5\u5bf9\u9ed8\u8ba4 IFS \u800c\u8a00\uff09\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"38\">@<\/td>\n<td width=\"516\">\u4f4d\u7f6e\u53c2\u6570\u4ece\u53c2\u6570 1 \u5f00\u59cb\u3002\u5982\u679c\u5728\u53cc\u5f15\u53f7\u4e2d\u8fdb\u884c\u6269\u5c55\uff0c\u5219\u6bcf\u4e2a\u53c2\u6570\u90fd\u4f1a\u6210\u4e3a\u4e00\u4e2a\u8bcd\uff0c\u56e0\u6b64 \u201c$@\u201d \u4e0e \u201c$1\u201d \u201c$2\u201d \u7b49\u6548\u3002\u5982\u679c\u53c2\u6570\u6709\u53ef\u80fd\u5305\u542b\u5d4c\u5165\u7a7a\u767d\uff0c\u90a3\u4e48\u60a8\u5c06\u9700\u8981\u4f7f\u7528\u8fd9\u79cd\u5f62\u5f0f\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"38\">#<\/td>\n<td width=\"516\">\u53c2\u6570\u6570\u91cf\uff08\u4e0d\u5305\u542b\u53c2\u6570 0\uff09\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color: #0000ff;\"><strong>\u6ce8\u610f\uff1a\u5982\u679c\u60a8\u62e5\u6709\u7684\u53c2\u6570\u591a\u4e8e 9 \u4e2a\uff0c\u5219\u4e0d\u80fd\u4f7f\u7528 $10 \u6765\u5f15\u7528\u7b2c\u5341\u4e2a\u53c2\u6570\u3002<\/strong><\/span>\u9996\u5148\uff0c\u60a8\u5fc5\u987b\u5904\u7406\u6216\u4fdd\u5b58\u7b2c\u4e00\u4e2a\u53c2\u6570\uff08$1\uff09\uff0c\u7136\u540e\u4f7f\u7528 shift \u547d\u4ee4\u5220\u9664\u53c2\u6570 1 \u5e76\u5c06\u6240\u6709\u5269\u4f59\u7684\u53c2\u6570\u4e0b\u79fb\u4e00\u4f4d\uff0c\u56e0\u6b64 $10 \u5c31\u53d8\u6210\u4e86 $9\uff0c\u4f9d\u6b64\u7c7b\u63a8\u3002$# \u7684\u503c\u5c06\u88ab\u66f4\u65b0\u4ee5\u53cd\u6620\u53c2\u6570\u7684\u5269\u4f59\u6570\u91cf\u3002\u5728\u5b9e\u8df5\u4e2d\uff0c\u6700\u5e38\u89c1\u7684\u60c5\u51b5\u662f\u5c06\u53c2\u6570\u8fed\u4ee3\u5230\u51fd\u6570\u6216 shell \u811a\u672c\uff0c\u6216\u8005\u8fed\u4ee3\u5230\u547d\u4ee4\u66ff\u6362\u4f7f\u7528 for \u8bed\u53e5\u521b\u5efa\u7684\u5217\u8868\uff0c\u56e0\u6b64\u8fd9\u4e2a\u7ea6\u675f\u57fa\u672c\u4e0d\u6210\u95ee\u9898\u3002<\/p>\n<p>==<\/p>\n<table width=\"554\">\n<tbody>\n<tr>\n<td colspan=\"2\" width=\"554\">\n<h5 style=\"text-align: center;\"><span style=\"color: #ff0000;\"><strong>Shell \u6269\u5c55\u6a21\u5f0f\u5339\u914d<\/strong><\/span><\/h5>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"246\">\u6269\u5c55<\/td>\n<td width=\"308\">\u76ee\u7684<\/td>\n<\/tr>\n<tr>\n<td width=\"246\">${PARAMETER#WORD}<\/td>\n<td width=\"308\">shell \u50cf\u6587\u4ef6\u540d\u6269\u5c55\u4e2d\u90a3\u6837\u6269\u5c55 WORD\uff0c\u5e76\u4ece PARAMETER \u6269\u5c55\u540e\u7684\u503c\u7684\u5f00\u5934\u5220\u9664\u6700\u77ed\u7684\u5339\u914d\u6a21\u5f0f\uff08\u82e5\u5b58\u5728\u5339\u914d\u6a21\u5f0f\u7684\u8bdd\uff09\u3002\u4f7f\u7528 \u2018@\u2019 \u6216 \u2018$\u2019 \u5373\u53ef\u5220\u9664\u5217\u8868\u4e2d\u6bcf\u4e2a\u53c2\u6570\u7684\u6a21\u5f0f\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"246\">${PARAMETER##WORD}<\/td>\n<td width=\"308\">\u5bfc\u81f4\u4ece\u5f00\u5934\u5220\u9664\u6700\u957f\u7684\u5339\u914d\u6a21\u5f0f\u800c\u4e0d\u662f\u6700\u77ed\u7684\u5339\u914d\u6a21\u5f0f\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"246\">${PARAMETER%WORD}<\/td>\n<td width=\"308\">shell \u50cf\u6587\u4ef6\u540d\u6269\u5c55\u4e2d\u90a3\u6837\u6269\u5c55 WORD\uff0c\u5e76\u4ece PARAMETER \u6269\u5c55\u540e\u7684\u503c\u672b\u5c3e\u5220\u9664\u6700\u77ed\u7684\u5339\u914d\u6a21\u5f0f\uff08\u82e5\u5b58\u5728\u5339\u914d\u6a21\u5f0f\u7684\u8bdd\uff09\u3002\u4f7f\u7528 \u2018@\u2019 \u6216 \u2018$\u2019 \u5373\u53ef\u5220\u9664\u5217\u8868\u4e2d\u6bcf\u4e2a\u53c2\u6570\u7684\u6a21\u5f0f\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"246\">${PARAMETER%%WORD}<\/td>\n<td width=\"308\">\u5bfc\u81f4\u4ece\u672b\u5c3e\u5220\u9664\u6700\u957f\u7684\u5339\u914d\u6a21\u5f0f\u800c\u4e0d\u662f\u6700\u77ed\u7684\u5339\u914d\u6a21\u5f0f\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"246\">${PARAMETER\/PATTERN\/STRING}<\/td>\n<td width=\"308\">shell \u50cf\u6587\u4ef6\u540d\u6269\u5c55\u4e2d\u90a3\u6837\u6269\u5c55 PATTERN\uff0c\u5e76\u66ff\u6362 PARAMETER \u6269\u5c55\u540e\u7684\u503c\u4e2d\u6700\u957f\u7684\u5339\u914d\u6a21\u5f0f\uff08\u82e5\u5b58\u5728\u5339\u914d\u6a21\u5f0f\u7684\u8bdd\uff09\u3002\u4e3a\u4e86\u5728 PARAMETER \u6269\u5c55\u540e\u7684\u503c\u5f00\u5934\u5339\u914d\u6a21\u5f0f\uff0c\u53ef\u4ee5\u7ed9 PATTERN \u9644\u4e0a\u524d\u7f00 #\uff0c\u5982\u679c\u8981\u5728\u503c\u672b\u5c3e\u5339\u914d\u6a21\u5f0f\uff0c\u5219\u9644\u4e0a\u524d\u7f00 %\u3002\u5982\u679c STRING \u4e3a\u7a7a\uff0c\u5219\u672b\u5c3e\u7684 \/ \u53ef\u80fd\u88ab\u5ffd\u7565\uff0c\u5339\u914d\u5c06\u88ab\u5220\u9664\u3002\u4f7f\u7528 \u2018@\u2019 \u6216 \u2018$\u2019 \u5373\u53ef\u5bf9\u5217\u8868\u4e2d\u7684\u6bcf\u4e2a\u53c2\u6570\u8fdb\u884c\u6a21\u5f0f\u66ff\u6362\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"246\">${PARAMETER\/\/PATTERN\/STRING}<\/td>\n<td width=\"308\">\u5bf9\u6240\u6709\u7684\u5339\u914d\uff08\u800c\u4e0d\u53ea\u662f\u7b2c\u4e00\u4e2a\u5339\u914d\uff09\u6267\u884c\u66ff\u6362\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>==<\/p>\n<table width=\"555\">\n<tbody>\n<tr>\n<td colspan=\"2\" width=\"555\">\n<h5 style=\"text-align: center;\"><span style=\"color: #ff0000;\"><strong>\u9ed8\u8ba4\u503c\u76f8\u5173\u7684 Shell \u6269\u5c55<\/strong><\/span><\/h5>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"180\">\u6269\u5c55<\/td>\n<td width=\"375\">\u76ee\u7684<\/td>\n<\/tr>\n<tr>\n<td width=\"180\">${PARAMETER:-WORD}<\/td>\n<td width=\"375\">\u5982\u679c PARAMETER \u6ca1\u6709\u8bbe\u7f6e\u6216\u8005\u4e3a\u7a7a\uff0c\u5219 shell \u6269\u5c55 WORD \u5e76\u66ff\u6362\u7ed3\u679c\u3002PARAMETER \u7684\u503c\u6ca1\u6709\u66f4\u6539\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"180\">${PARAMETER:=WORD}<\/td>\n<td width=\"375\">\u5982\u679c PARAMETER \u6ca1\u6709\u8bbe\u7f6e\u6216\u8005\u4e3a\u7a7a\uff0c\u5219 shell \u6269\u5c55 WORD \u5e76\u5c06\u7ed3\u679c\u6307\u6d3e\u7ed9 PARAMETER\u3002\u8fd9\u4e2a\u503c\u7136\u540e\u88ab\u66ff\u6362\u3002\u4e0d\u80fd\u7528\u8fd9\u79cd\u65b9\u5f0f\u6307\u6d3e\u4f4d\u7f6e\u53c2\u6570\u6216\u7279\u6b8a\u53c2\u6570\u7684\u503c\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"180\">${PARAMETER:?WORD}<\/td>\n<td width=\"375\">\u5982\u679c PARAMETER \u6ca1\u6709\u8bbe\u7f6e\u6216\u8005\u4e3a\u7a7a\uff0cshell \u6269\u5c55 WORD \u5e76\u5c06\u7ed3\u679c\u5199\u5165\u6807\u51c6\u9519\u8bef\u4e2d\u3002\u5982\u679c\u6ca1\u6709 WORD \u5219\u5199\u5165\u4e00\u6761\u6d88\u606f\u3002\u5982\u679c shell \u4e0d\u662f\u4ea4\u4e92\u5f0f\u7684\uff0c\u5219\u8868\u793a\u5b58\u5728\u8fd9\u4e2a\u6269\u5c55\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"180\">${PARAMETER:+WORD}<\/td>\n<td width=\"375\">\u5982\u679c PARAMETER \u6ca1\u6709\u8bbe\u7f6e\u6216\u8005\u4e3a\u7a7a\uff0c\u5219\u4e0d\u4f5c\u66ff\u6362\u3002\u5426\u5219 shell \u6269\u5c55 WORD \u5e76\u66ff\u6362\u7ed3\u679c\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h6>\u53c2\u8003\u94fe\u63a5\uff1a<\/h6>\n<p><a href=\"http:\/\/www.ibm.com\/developerworks\/cn\/linux\/l-bash-parameters.html\" target=\"_blank\">Linux \u6280\u5de7: Bash \u53c2\u6570\u548c\u53c2\u6570\u6269\u5c55<\/a><\/p>\n<p>====<\/p>\n<h5>Linux shell\u4e2d\u7684IFS\u53d8\u91cf<\/h5>\n<h6>\u641c\u7d22\u5173\u952e\u5b57\uff1a<\/h6>\n<ul>\n<li><a href=\"https:\/\/www.baidu.com\/s?wd=bash%20%24IFS\" target=\"_blank\">bash $IFS_\u767e\u5ea6\u641c\u7d22<\/a><\/li>\n<li><a href=\"http:\/\/search.aol.com\/aol\/search?q=bash+%24IFS\" target=\"_blank\">http:\/\/search.aol.com\/aol\/search?q=bash+%24IFS<\/a><\/li>\n<\/ul>\n<h6>$IFS<\/h6>\n<p>\u4e34\u65f6\u4fee\u6539IFS\u53d8\u91cf\u4e3a\u6362\u884c\u7b26\u65f6\uff08IFS\u53d8\u91cf\u7684\u9ed8\u8ba4\u503c\u4e3a\uff1a\u7a7a\u683c\u3001\u5236\u8868\u7b26\u3001\u6362\u884c\u7b26\uff09\uff0c\u9700\u8981\u6ce8\u610f\u683c\u5f0f\u4e3a\uff1a<\/p>\n<pre class=\"lang:default decode:true\">IFS=$'\\n'<\/pre>\n<p>The IFS is a special shell variable.<\/p>\n<p>You can change the value of IFS as per your requirments.<\/p>\n<p>The Internal Field Separator (IFS) that is used for word splitting after expansion and to split lines into words with the <a href=\"http:\/\/bash.cyberciti.biz\/guide\/Read_command\">read builtin command<\/a>.<\/p>\n<p>The default value is &lt;space&gt;&lt;tab&gt;&lt;newline&gt;. You can print it with the following command:<\/p>\n<pre class=\"lang:default decode:true\">cat -etv &lt;&lt;&lt;\"$IFS\"<\/pre>\n<p>IFS variable is commonly used with read command, parameter expansions and command substitution.<\/p>\n<p>From the bash man page:<\/p>\n<blockquote>\n<p style=\"padding-left: 30px;\">The shell treats each character of IFS as a delimiter, and splits the results of the other expansions into words on these characters. If IFS is unset, or its value is exactly &lt;space&gt;&lt;tab&gt;&lt;newline&gt;, the default, then sequences of &lt;space&gt;, &lt;tab&gt;, and &lt;newline&gt; at the beginning and end of the results of the previous expansions are ignored, and any sequence of IFS characters not at the beginning or end serves to delimit words. If IFS has a value other than the default, then sequences of the whitespace characters space and tab are ignored at the beginning and end of the word, as long as the whitespace character is in the value of IFS (an IFS whitespace character). Any character in IFS that is not IFS whitespace, along with any adjacent IFS whitespace characters, delimits a field. A sequence of IFS whitespace characters is also treated as a delimiter. If the value of IFS is null, no word splitting occurs.<\/p>\n<\/blockquote>\n<p>The default value of IFS is a space, a tab, and a newline.<\/p>\n<h5>Command Substitution<\/h5>\n<p>Command substitution allows the output of a command to replace the command itself. Command substitution occurs when a command is enclosed as follows:<\/p>\n<pre class=\"lang:default decode:true\">$(command)<\/pre>\n<p>or<\/p>\n<pre class=\"lang:default decode:true\">`command`<\/pre>\n<p>Bash performs the expansion by executing command and replacing the command substitution with the standard output of the command, with any trailing newlines deleted. Embedded newlines are not deleted, but they may be removed during word splitting. <strong><span style=\"color: #ff0000;\">The command substitution $(cat file) can be replaced by the equivalent but faster $(&lt; file).<\/span><\/strong><\/p>\n<blockquote>\n<p style=\"padding-left: 30px;\">When the old-style backquote form of substitution is used, backslash retains its literal meaning except when followed by \u2018$\u2019, \u2018`\u2019, or \u2018\\\u2019. The first backquote not preceded by a backslash terminates the command substitution. <strong>When using the $(command) form, all characters between the parentheses make up the command; none are treated specially.<\/strong><\/p>\n<\/blockquote>\n<p>Command substitutions may be nested. To nest when using the backquoted form, escape the inner backquotes with backslashes.<\/p>\n<p>If the substitution appears within double quotes, word splitting and filename expansion are not performed on the results.<\/p>\n<h6>\u53c2\u8003\u94fe\u63a5\uff1a<\/h6>\n<ul>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/4128235\/bash-shell-scripting-what-is-the-exact-meaning-of-ifs-n\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/4128235\/bash-shell-scripting-what-is-the-exact-meaning-of-ifs-n<\/a><\/li>\n<li><a href=\"http:\/\/unix.stackexchange.com\/questions\/17732\/where-has-the-trailing-newline-char-gone-from-my-command-substitution\" target=\"_blank\">http:\/\/unix.stackexchange.com\/questions\/17732\/where-has-the-trailing-newline-char-gone-from-my-command-substitution<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/16831429\/when-setting-ifs-to-split-on-newlines-why-is-it-necessary-to-include-a-backspac\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/16831429\/when-setting-ifs-to-split-on-newlines-why-is-it-necessary-to-include-a-backspac<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/19190967\/shell-temp-ifs-as-newline-only-why-doesnt-this-work-ifs-echo-e-n\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/19190967\/shell-temp-ifs-as-newline-only-why-doesnt-this-work-ifs-echo-e-n<\/a><\/li>\n<li><a href=\"http:\/\/blog.csdn.net\/whuslei\/article\/details\/7187639\" target=\"_blank\">Shell\u4e2d\u7684IFS\u89e3\u60d1<\/a><\/li>\n<li><a href=\"http:\/\/smilejay.com\/2011\/12\/bash_ifs\/\" target=\"_blank\">http:\/\/smilejay.com\/2011\/12\/bash_ifs\/<\/a><\/li>\n<li><a href=\"http:\/\/blog.csdn.net\/crazyss\/article\/details\/6655247\" target=\"_blank\">http:\/\/blog.csdn.net\/crazyss\/article\/details\/6655247<\/a><\/li>\n<li><a href=\"http:\/\/www.ibm.com\/developerworks\/cn\/linux\/l-bash-parameters.html\" target=\"_blank\">http:\/\/www.ibm.com\/developerworks\/cn\/linux\/l-bash-parameters.html<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0d\u5199\u591a\u4f59\u7684\u5185\u5bb9\uff0c\u53ea\u653e3\u5f20\u8868\u683c\uff0c\u4e00\u76ee\u4e86\u7136\uff1a \u51fd\u6570\u7684 Shell \u53c2\u6570 \u53c2\u6570 \u76ee\u7684 0, 1, 2, &#038;#8230 [&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],"tags":[83,485],"class_list":["post-2046","post","type-post","status-publish","format-standard","hentry","category-knowledgebase-2","category-linux","category-programing","tag-bash","tag-ifs"],"views":2757,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/2046","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=2046"}],"version-history":[{"count":0,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/2046\/revisions"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=2046"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=2046"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=2046"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}