{"id":1579,"date":"2011-09-18T13:47:11","date_gmt":"2011-09-18T05:47:11","guid":{"rendered":"http:\/\/www.jpuyy.com\/blog\/?p=1579"},"modified":"2012-12-06T17:07:18","modified_gmt":"2012-12-06T09:07:18","slug":"12-shell-for-examples","status":"publish","type":"post","link":"https:\/\/jpuyy.com\/?p=1579","title":{"rendered":"shell\u4e0b12\u4e2afor\u5faa\u73af\u4f8b\u5b50"},"content":{"rendered":"<p>12\u4e2a\u4f8b\u5b50\u5199\u7684\u5f88\u5168\uff0c\u8f6c\u81ea<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"RdOuZotGSl\"><p><a href=\"https:\/\/www.thegeekstuff.com\/2011\/07\/bash-for-loop-examples\/\">12 Bash For Loop Examples for Your Linux Shell Scripting<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;12 Bash For Loop Examples for Your Linux Shell Scripting&#8221; &#8212; The Geek Stuff\" src=\"https:\/\/www.thegeekstuff.com\/2011\/07\/bash-for-loop-examples\/embed\/#?secret=wZH896w3JY#?secret=RdOuZotGSl\" data-secret=\"RdOuZotGSl\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>\u57fa\u672c\u683c\u5f0f1\uff0c\u7528for in\uff1a<\/p>\n<pre>for varname in list\r\ndo\r\n command1\r\n command2\r\n ..\r\ndone<\/pre>\n<p>\u57fa\u672c\u683c\u5f0f2\uff0cc\u8bed\u8a00\u5f62\u5f0f\uff1a<\/p>\n<pre>for (( expr1; expr2; expr3 ))\r\ndo\r\ncommand1\r\ncommand2 ..\r\ndone<\/pre>\n<h3>1. Static values for the list after \u201cin\u201d keyword\u76f4\u63a5\u5728&#8221;in&#8221;\u540e\u9762\u63a5\u503c<\/h3>\n<p>In the following example, the list of values (Mon, Tue, Wed, Thu and Fri) are directly given after the keyword \u201cin\u201d in the bash for loop.\u5728\u4e0b\u9762\u7684\u4f8b\u5b50\u4e2d\uff0c\u53d8\u91cf\u4e3aday\uff0c\u5728Mon,Tue,Wed,Thu\u548cFri\u4e2d\u53d6\u503c\u3002<\/p>\n<pre>$ cat for1.sh\r\ni=1\r\nfor day in Mon Tue Wed Thu Fri\r\ndo\r\n echo \"Weekday $((i++)) : $day\"\r\ndone\r\n\r\n$ .\/for1.sh\r\nWeekday 1 : Mon\r\nWeekday 2 : Tue\r\nWeekday 3 : Wed\r\nWeekday 4 : Thu\r\nWeekday 5 : Fri<\/pre>\n<p><strong>Caution:<\/strong> The list of values should not be separated by comma (Mon, Tue, Wed, Thu, Fri). The comma will be treated as part of the value. i.e Instead of \u201cMon\u201d, it will use \u201cMon,\u201d as value as shown in the example below.\u6ce8\u610f\u70b9\uff1a\u4e94\u4e2a\u4e0d\u540c\u7684\u503c\u4e0d\u80fd\u7528\u9017\u53f7\u5206\u9694\uff0c\u4f8b\u5982<code>Mon,<\/code>\u56e0\u4e3a\u4f1a\u81ea\u52a8\u628a\u9017\u53f7\u7b97\u5165\u5230<code>Mon<\/code>\u4e4b\u5185\u3002\u6d4b\u8bd5\u5982\u4e0b\uff1a<\/p>\n<pre>$ cat for1-wrong1.sh\r\ni=1\r\nfor day in Mon, Tue, Wed, Thu, Fri\r\ndo\r\n echo \"Weekday $((i++)) : $day\"\r\ndone\r\n\r\n$ .\/for1-wrong1.sh\r\nWeekday 1 : Mon,\r\nWeekday 2 : Tue,\r\nWeekday 3 : Wed,\r\nWeekday 4 : Thu,\r\nWeekday 5 : Fri<\/pre>\n<p><strong>Caution:<\/strong> The list of values should not be enclosed in a double quote. (\u201cMon Tue Wed Thu Fri\u201d). If you enclose in double quote, it will be treated as a single value (instead of 5 different values), as shown in the example below.\u6ce8\u610f\uff1a\u4e94\u4e2a\u503c\u4e0d\u53ef\u4ee5\u7528\u53cc\u5f15\u53f7\u62ec\u8d77\u6765\uff0c\u8fd9\u4f1a\u88ab\u8ba4\u4e3a\u53ea\u6709\u4e00\u4e2a\u503c<\/p>\n<pre>$ cat for1-wrong2.sh\r\ni=1\r\nfor day in \"Mon Tue Wed Thu Fri\"\r\ndo\r\n echo \"Weekday $((i++)) : $day\"\r\ndone\r\n\r\n$ .\/for1-wrong2.sh\r\nWeekday 1 : Mon Tue Wed Thu Fri<\/pre>\n<h3>2. Variable for the list after \u201cin\u201d keyword\u5728&#8221;in&#8221;\u540e\u9762\u63a5\u53d8\u91cf<\/h3>\n<p>Instead of providing the values directly in the for loop, you can store the values in a variable, and use the variable in the for loop after the \u201cin\u201d keyword, as shown in the following example.\u5728\u4f7f\u7528\u524d\u628a\u503c\u8d4b\u7ed9\u53d8\u91cf\uff0c\u5728&#8221;in&#8221;\u540e\u9762\u63a5\u53d8\u91cf\u3002<\/p>\n<pre>$ cat for2.sh\r\ni=1\r\nweekdays=\"Mon Tue Wed Thu Fri\"\r\nfor day in $weekdays\r\ndo\r\n echo \"Weekday $((i++)) : $day\"\r\ndone\r\n\r\n$ .\/for2.sh\r\nWeekday 1 : Mon\r\nWeekday 2 : Tue\r\nWeekday 3 : Wed\r\nWeekday 4 : Thu\r\nWeekday 5 : Fri<\/pre>\n<p><strong>Caution<\/strong>: As a best practice, you should always quote the bash variables when you are referring it. There are few exceptions to this best practice rule. This is one of them. If you double quote the variable in this for loop, the list of values will be treated as single value. Lot of people fall into this trap. Be careful and do not double quote your variable in the for loop.\u6ce8\u610f\uff1a\u4f5c\u4e3a\u4e00\u4e2a\u826f\u597d\u7684\u4e60\u60ef\uff0c\u8bf7\u6bcf\u6b21\u90fd\u5c06\u503c\u7528\u53d8\u91cf\u6765\u4ee3\u66ff\u3002\u8fd9\u91cc\u7684\u53d8\u91cf\u4e0d\u80fd\u7528\u53cc\u5f15\u53f7\u62ec\u8d77\u6765\uff0c\u5b83\u4f1a\u5c06\u5176\u89c6\u4e3a\u4e00\u4e2a\u503c\u3002\u6d4b\u8bd5\u5982\u4e0b\uff1a<\/p>\n<pre>$ cat for2-wrong.sh\r\ni=1\r\nweekdays=\"Mon Tue Wed Thu Fri\"\r\nfor day in \"$weekdays\"\r\ndo\r\n echo \"Weekday $((i++)) : $day\"\r\ndone\r\n\r\n$ .\/for2-wrong.sh\r\nWeekday 1 : Mon Tue Wed Thu Fri<\/pre>\n<h3>3. Don\u2019t specify the list; get it from the positional parameters\u4e0d\u6307\u5b9a\u5217\u8868<\/h3>\n<p>If you don\u2019t specify the keyword \u201cin\u201d followed by any list of values in the bash for loop, it will use the positional parameters (i.e the arguments that are passed to the shell script).\u5982\u679cin\u4e2d\u4e0d\u52a0\u53d8\u91cf\uff0c\u5219\u5728\u6267\u884c\u65f6\u52a0\u4e0a\u5373\u53ef\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre>$ cat for3.sh\r\ni=1\r\nfor day\r\ndo\r\n echo \"Weekday $((i++)) : $day\"\r\ndone\r\n\r\n$ .\/for3.sh Mon Tue Wed Thu Fri\r\nWeekday 1 : Mon\r\nWeekday 2 : Tue\r\nWeekday 3 : Wed\r\nWeekday 4 : Thu\r\nWeekday 5 : Fri<\/pre>\n<p><strong>Caution:<\/strong> Please be careful if you use this method. You should not include the keyword \u201cin\u201d in the for loop. If you leave the keyword \u201cin\u201d without any values, it will not use the positional parameter as shown below. It will not go inside the loop. i.e for loop will never get executed as shown in the example below.\u4f7f\u7528\u8fd9\u79cd\u65b9\u6cd5\u4e00\u5b9a\u8981\u5c0f\u5fc3\uff0c\u4fdd\u8bc1 in \u8fd9\u4e2a\u5b57\u7b26\u90fd\u4e0d\u51fa\u73b0\uff0c\u4e0b\u9762\u7684\u4f8b\u5b50\u5c31\u662f\u6ca1\u6709\u8f93\u51fa\u4efb\u4f55\u4fe1\u606f\u3002<\/p>\n<pre>$ cat for3-wrong.sh\r\ni=1\r\nfor day in\r\ndo\r\n echo \"Weekday $((i++)) : $day\"\r\ndone\r\n\r\n$ .\/for3-wrong.sh Mon Tue Wed Thu Fri<\/pre>\n<p><strong>Note<\/strong>: Refer to our earlier article to understand more about <a href=\"http:\/\/www.thegeekstuff.com\/2010\/05\/bash-shell-positional-parameters\/\" target=\"_blank\">bash positional parameters<\/a>.\u53ef\u4ee5\u67e5\u770bbash\u4f4d\u7f6e\u53c2\u6570\u3002<\/p>\n<h3>4. Unix command output as list values after \u201cin\u201d keyword\u4ee5\u547d\u4ee4\u7684\u8f93\u51fa\u505a\u4e3a\u5217\u8868<\/h3>\n<p>You can use the output of any UNIX \/ Linux command as list of values to the for loop by enclosing the command in back-ticks ` ` as shown below.\u4f7f\u7528\u53cd\u5f15\u53f7\u5c06\u8981\u6267\u884c\u7684\u547d\u4ee4\u5f15\u8d77\u6765\uff0c\u53ef\u4f7f\u7ed3\u679c\u4f5c\u4e3a\u5217\u8868\u3002<\/p>\n<pre>$ cat for4.sh\r\ni=1\r\nfor username in `awk -F: '{print $1}' \/etc\/passwd`\r\ndo\r\n echo \"Username $((i++)) : $username\"\r\ndone\r\n\r\n$ .\/for4.sh\r\nUsername 1 : ramesh\r\nUsername 2 : john\r\nUsername 3 : preeti\r\nUsername 4 : jason\r\n..<\/pre>\n<h3>5. Loop through files and directories in a for loop\u4f7f\u7528\u5f53\u524d\u76ee\u5f55\u6216\u6587\u4ef6\u505a\u5217\u8868<\/h3>\n<p>To loop through files and directories under a specific directory, just cd to that directory, and give * in the for loop as shown below.\u5b9a\u4f4d\u5230\u6307\u5b9a\u76ee\u5f55\u4e0b\uff0c\u7528*\u4ee3\u66ff\u5217\u8868\u3002<\/p>\n<p>The following example will loop through all the files and directories under your home directory.\u4e0b\u9762\u7684\u4f8b\u5b50\u4f7f\u7528\u4e86\/home\u76ee\u5f55\u3002<\/p>\n<pre>$ cat for5.sh\r\ni=1\r\ncd ~\r\nfor item in *\r\ndo\r\n echo \"Item $((i++)) : $item\"\r\ndone\r\n\r\n$ .\/for5.sh\r\nItem 1 : positional-parameters.sh\r\nItem 2 : backup.sh\r\nItem 3 : emp-report.awk\r\nItem 4 : item-list.sed\r\nItem 5 : employee.db\r\nItem 8 : storage\r\nItem 9 : downloads<\/pre>\n<p>Usage of * in the bash for loop is similar to the file globbing that we use in the linux command line when we use ls command (and other commands).\u4e0a\u9762\u7684\u4f8b\u5b50\u663e\u793a\u7c7b\u4f3c\u4e8els\u7684\u6267\u884c\u7ed3\u679c\u3002<\/p>\n<p>For example, the following will display all the files and directories under your home directory. This is the concept that is used in the above for5.sh example.<\/p>\n<pre>cd ~\r\nls *<\/pre>\n<p>The following will display all the *.conf file that begins with either a, b, or, c or d under \/etc directory.\u4e0b\u9762\u663e\u793a\u4ee5a,b,c\u6216d\u5f00\u5934\uff0c\u4ee5.conf\u7ed3\u5c3e\u7684\u6587\u4ef6<\/p>\n<pre>$ ls -1 \/etc\/[abcd]*.conf\r\n\/etc\/asound.conf\r\n\/etc\/autofs_ldap_auth.conf\r\n\/etc\/cas.conf\r\n\/etc\/cgconfig.conf\r\n\/etc\/cgrules.conf\r\n\/etc\/dracut.conf<\/pre>\n<p>The same argument that is used in the ls command above, can be used in a bash for loop, as shown in the example below.\u4e0a\u9762\u7684\u53ef\u76f4\u63a5\u4f5c\u4e3a\u5217\u8868<\/p>\n<pre>$ cat for5-1.sh\r\ni=1\r\nfor file in \/etc\/[abcd]*.conf\r\ndo\r\n echo \"File $((i++)) : $file\"\r\ndone\r\n\r\n$ .\/for5-1.sh\r\nFile 1 : \/etc\/asound.conf\r\nFile 2 : \/etc\/autofs_ldap_auth.conf\r\nFile 3 : \/etc\/cas.conf\r\nFile 4 : \/etc\/cgconfig.conf\r\nFile 5 : \/etc\/cgrules.conf\r\nFile 6 : \/etc\/dracut.conf<\/pre>\n<h3>6. Break out of the for loop(for\u5faa\u73af\u4e2d\u7684break)<\/h3>\n<p>You can break out of a for loop using \u2018break\u2019 command as shown below.\u53ef\u4ee5\u4f7f\u7528\u5982\u4e0b\u7684\u65b9\u5f0f\uff0c\u4e2d\u65adfor\u5faa\u73af\u3002<\/p>\n<pre>$ cat for6.sh\r\ni=1\r\nfor day in Mon Tue Wed Thu Fri\r\ndo\r\n echo \"Weekday $((i++)) : $day\"\r\n if [ $i -eq 3 ]; then\r\n   break;\r\n fi\r\ndone\r\n\r\n$ .\/for6.sh\r\nWeekday 1 : Mon\r\nWeekday 2 : Tue<\/pre>\n<h3>7. Continue from the top of the for loop(for\u5faa\u73af\u4e2d\u7684continue)<\/h3>\n<p>Under certain conditions, you can ignore the rest of the commands in the for loop, and continue the loop from the top again (for the next value in the list), using the continue command as shown below.\u5728\u6709\u4e9b\u60c5\u51b5\u4e0b\uff0c\u53ef\u4ee5\u5ffd\u7565\u67d0\u4e9b\u4e4b\u540e\u518d\u56de\u5230\u5faa\u73af\u4e2d\uff0c\u4f7f\u7528continue\u5373\u53ef\u505a\u5230\u3002<\/p>\n<p>The following example adds \u201c(WEEKEND)\u201d to Sat and Sun, and \u201c(weekday)\u201d to rest of the days.\u5f53\u5faa\u73af\u9047\u5230i=7 \u6216i=8\u65f6\uff0c\u663e\u793aWEEKEND\uff0c\u7136\u540e\u7ee7\u7eed\u3002<\/p>\n<pre>$ cat for7.sh\r\ni=1\r\nfor day in Mon Tue Wed Thu Fri Sat Sun\r\ndo\r\n echo -n \"Day $((i++)) : $day\"\r\n if [ $i -eq 7 -o $i -eq 8 ]; then\r\n   echo \" (WEEKEND)\"\r\n   continue;\r\n fi\r\n echo \" (weekday)\"\r\ndone\r\n\r\n$ .\/for7.sh\r\nDay 1 : Mon (weekday)\r\nDay 2 : Tue (weekday)\r\nDay 3 : Wed (weekday)\r\nDay 4 : Thu (weekday)\r\nDay 5 : Fri (weekday)\r\nDay 6 : Sat (WEEKEND)\r\nDay 7 : Sun (WEEKEND)<\/pre>\n<h3>8. Bash for loop using C program syntax\u4f7f\u7528C\u8bed\u8a00for\u5faa\u73af\u8bed\u6cd5<\/h3>\n<p>This example uses the 2nd method of bash for loop, which is similar to the C for loop syntax. The following example generates 5 random number using the bash C-style for loop.\u5728\u6587\u7ae0\u5f00\u5934\u6709\u4f7f\u7528c\u8bed\u8a00\u7684for\u5faa\u73af\uff0c\u4e0b\u9762\u7684\u4f8b\u5b50\u751f\u6210\u51fa1-5\u4e2a\u6570\u5b57<\/p>\n<pre>$ cat for8.sh\r\nfor (( i=1; i &lt;= 5; i++ ))\r\ndo\r\n echo \"Random number $i: $RANDOM\"\r\ndone\r\n\r\n$ .\/for8.sh\r\nRandom number 1: 23320\r\nRandom number 2: 5070\r\nRandom number 3: 15202\r\nRandom number 4: 23861\r\nRandom number 5: 23435<\/pre>\n<h3>9.\u00a0Infinite\u00a0Bash for loop\u65e0\u9650\u5faa\u73af<\/h3>\n<p>When you don\u2019t provide the start, condition, and increment in the bash C-style for loop, it will become infinite loop. You need to press Ctrl-C to stop the loop.\u5f53\u4e0d\u8bbe\u5b9a\u8d77\u59cb\uff0c\u6761\u4ef6\u548c\u6b65\u957f\u7684\u65f6\u5019\uff0c\u4f1a\u53d8\u4e3a\u65e0\u9650\u5faa\u73af\uff0c\u53ea\u80fd\u901a\u8fc7Ctrl-C\u6765\u505c\u6b62\u3002<\/p>\n<pre>$ cat for9.sh\r\ni=1;\r\nfor (( ; ; ))\r\ndo\r\n   sleep $i\r\n   echo \"Number: $((i++))\"\r\ndone<\/pre>\n<p>Like we said above, press Ctrl-C to break out of this bash infinite for loop example.<\/p>\n<pre>$ .\/for9.sh\r\nNumber: 1\r\nNumber: 2\r\nNumber: 3<\/pre>\n<h3>10. Using comma in the bash C-style for loop\u5728c\u8bed\u8a00\u7c7b\u4f3c\u7684\u5faa\u73af\u4e2d\u4f7f\u7528\u9017\u53f7<\/h3>\n<p>In the bash c-style loop, apart from increment the value that is used in the condition, you can also increment some other value as shown below.\u5728c\u8bed\u8a00\u7c7b\u4f3c\u7684\u5faa\u73af\u4e2d\uff0c\u53ef\u4ee5\u5c06\u589e\u957f\u548c\u53d8\u91cf\u5206\u5f00\u3002<\/p>\n<p>In the initialize section, and the increment section of the bash C-style for loop, you can have multiple value by separating with comma as shown below.<\/p>\n<p>The following for loop is executed a total of 5 times, using the variable i. However the variable j start with 5, and getting increment by 5 every time the loop gets executed.\u4e0b\u9762\u7684\u4f8b\u5b50\u5c06\u6267\u884c5\u6b21\uff0c\u4f46\u662f\u76ee\u6807\u662f\u6539\u53d8j\u7684\u503c\uff0c\u6bcf\u4e00\u6b21\u52a05<\/p>\n<pre>$ cat for10.sh\r\nfor ((i=1, j=10; i &lt;= 5 ; i++, j=j+5))\r\ndo\r\n echo \"Number $i: $j\"\r\ndone\r\n\r\n$ .\/for10.sh\r\nNumber 1: 10\r\nNumber 2: 15\r\nNumber 3: 20\r\nNumber 4: 25\r\nNumber 5: 30<\/pre>\n<h3>11. Range of numbers after \u201cin\u201d keyword\u5728in\u5217\u8868\u4e2d\u4f7f\u7528\u6570\u5b57\u533a\u95f4<\/h3>\n<p>You can loop through using range of numbers in the for loop \u201cin\u201d using brace expansion.<\/p>\n<p>The following example loops through 10 times using the values 1 through 10.\u4e0b\u9762\u7684\u4f8b\u5b50\u53d6\u503c1\u523010,\u7528\u5927\u62ec\u53f7\u62ec\u8d77\u6765\u3002<\/p>\n<pre>$ cat for11.sh\r\nfor num in {1..10}\r\ndo\r\n echo \"Number: $num\"\r\ndone\r\n\r\n$ .\/for11.sh\r\nNumber: 1\r\nNumber: 2\r\nNumber: 3\r\nNumber: 4\r\nNumber: 5\r\n...<\/pre>\n<h3>12. Range of numbers with increments after \u201cin\u201d keyword\u5728in\u5217\u8868\u4e2d\u4f7f\u7528\u6570\u5b57\u533a\u95f4\uff0c\u5e76\u4ee52\u505a\u4e3a\u6b65\u957f\u3002<\/h3>\n<p>The following example loops through 5 times using the values 1 through 10, with an increment of 2. i.e It starts with 1, and keeps incrementing by 2, until it reaches 10.<\/p>\n<pre>$ cat for12.sh\r\nfor num in {1..10..2}\r\ndo\r\n echo \"Number: $num\"\r\ndone\r\n\r\n$ .\/for12.sh\r\nNumber: 1\r\nNumber: 3\r\nNumber: 5\r\nNumber: 7\r\nNumber: 9<\/pre>\n<p>12\u4e2afor\u5faa\u73af\u7684\u4f8b\u5b50\u5f88\u57fa\u7840\u5f88\u89c4\u8303\uff0c\u591a\u770b\u4f18\u8d28\u4ee3\u7801\u624d\u80fd\u66f4\u5feb\u6210\u957f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>12\u4e2a\u4f8b\u5b50\u5199\u7684\u5f88\u5168\uff0c\u8f6c\u81ea 12 Bash For Loop Examples for Your Linux Shell Scripting \u57fa\u672c\u683c\u5f0f1\uff0c\u7528for in\uff1a for varname in list do command1 command2 .. done \u57fa\u672c\u683c\u5f0f2\uff0cc\u8bed\u8a00\u5f62\u5f0f\uff1a for (( expr1; expr2; expr3 )) do command1 command2 .. done 1. Static values for the list after \u201cin\u201d keyword\u76f4\u63a5\u5728&#8221;in&#8221;\u540e\u9762\u63a5\u503c In the following example, the list of values (Mon, Tue, Wed, Thu [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[23],"class_list":["post-1579","post","type-post","status-publish","format-standard","hentry","category-linux","tag-summary"],"_links":{"self":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/1579","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1579"}],"version-history":[{"count":8,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/1579\/revisions"}],"predecessor-version":[{"id":4410,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/1579\/revisions\/4410"}],"wp:attachment":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1579"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1579"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}