{"id":186960,"date":"2021-02-23T17:00:21","date_gmt":"2021-02-23T14:00:21","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/bash-automation-and-scripting-basics-part-3-cloudsavvy-it\/"},"modified":"2021-02-23T17:00:21","modified_gmt":"2021-02-23T14:00:21","slug":"bash-automation-and-scripting-basics-part-3-cloudsavvy-it","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/bash-automation-and-scripting-basics-part-3-cloudsavvy-it\/","title":{"rendered":"#Bash Automation and Scripting Basics (Part 3) \u2013 CloudSavvy IT"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a3894bca1046\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a3894bca1046\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/bash-automation-and-scripting-basics-part-3-cloudsavvy-it\/#Bash_Automation_and_Scripting_Basics\" >Bash Automation and Scripting Basics<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/bash-automation-and-scripting-basics-part-3-cloudsavvy-it\/#Script_Debugging\" >Script Debugging<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/bash-automation-and-scripting-basics-part-3-cloudsavvy-it\/#Running_Scripts_as_Background_Processes\" >Running Scripts as Background Processes<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/buradabiliyorum.com\/en\/bash-automation-and-scripting-basics-part-3-cloudsavvy-it\/#Importing_Scripts_Using_source\" >Importing Scripts Using source<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/buradabiliyorum.com\/en\/bash-automation-and-scripting-basics-part-3-cloudsavvy-it\/#In_Summary\" >In Summary<\/a><\/li><\/ul><\/nav><\/div>\n<p><strong>&#8220;#Bash Automation and <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">Script<\/a>ing Basics (Part 3) \u2013 CloudSavvy IT&#8221;<\/strong><\/p>\n<div id=\"article-content-area\">\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9748\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/6a265fd5b3845c325bc5e843a1ff97bc\/p\/uploads\/2021\/02\/cc604deb.png\" alt=\"\" width=\"700\" height=\"307\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><span class=\"imagecredit\"><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.shutterstock.com\/image-illustration\/robot-typing-on-computer-keyboard-automation-400106332\">Shutterstock\/Mopic<\/a><\/span><\/p>\n<p>In this final article in our three part Bash automation and scripting basics <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/watch-movies-tv-seriess\/\" data-internallinksmanager029f6b8e52c=\"8\" title=\"Watch Movies &amp; TV Series\" target=\"_blank\" rel=\"noopener\">series<\/a>, we will explore script debugging, running scripts as a background process, and importing other scripts using the source command.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Bash_Automation_and_Scripting_Basics\"><\/span>Bash Automation and Scripting Basics<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If you would like to start at the beginning, please read our Bash Automation and Scripting Basics Part 1 article. This final article in our three part series on Bash automation and scripting basics will look at running scripts as a background process.<\/p>\n<p>We also want to quickly debug our scripts with minimal fuss and high-end results. This can be done using a very handy tracing feature, build directly into the Bash command interpreter. We\u2019ll look into this in the second topic. You may also want to keep an eye out for our upcoming article on the related shellcheck.<\/p>\n<p>And finally we will explore how to run scripts as a background process. While this may provide modest im<a href=\"https:\/\/buradabiliyorum.com\/en\/category\/social-mediaa\/\" data-internallinksmanager029f6b8e52c=\"1\" title=\"Social Media\" target=\"_blank\" rel=\"noopener\">media<\/a>te benefits \u2013 such as starting multiple tasks at once, it also lays some of the ground work for later more advanced multi-threaded scripts.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Script_Debugging\"><\/span>Script Debugging<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Debugging a script in Bash need not be hard! Keep an eye on the CloudSavvyIT website as soon we will review the more comprehensive shellcheck debugging tool for Bash, but for the moment I would like to introduce you to a great way to debug Shell scripts in a straightforward and easy to understand way.<\/p>\n<p>Within the Bash shell, which after all is a <i>\u201csimple\u201d<\/i> binary running on your machine \u2013 namely the <code>bash<\/code> binary, there is an option provided (<code>-x<\/code>) which, according to <code>man bash<\/code> (executing this in your terminal will show a Bash manual) is described as <i>Print commands and their arguments as they are executed<\/i>, and this is exactly what it does! How will this help with debugging? Have a look at the following example:<\/p>\n<pre>#!\/bin\/bash&#13;\n&#13;\nA=1&#13;\nB=2&#13;\nif [ \"${AA}\" == \"1\" -o \"${B}\" == \"1\" ]; then &#13;\n  echo \"One ('1') was definitely stored in either the variable A, or the variable B\"&#13;\n  exit 0&#13;\nelse&#13;\n  echo \"Assert: could not locate the value '1' in the variables A and B\"&#13;\n  exit 1&#13;\nfi&#13;\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9769 size-full\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/00bbbf1c748523453807506e1dd31dfa\/p\/uploads\/2021\/02\/961bc952.png\" alt=\"A small Bash script with a bug\" width=\"735\" height=\"306\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Here we check the variables <code>A<\/code> and <code>B<\/code> against the value <code>1<\/code>. The <code>-o<\/code> idiom in the <code>if<\/code> statement stands for <code>OR<\/code>, i.e. either the first part (<code>A<\/code>, or rather <code>AA<\/code> here, is <code>1<\/code>) is true, or the second part (<code>B<\/code> is <code>1<\/code>) is true and in such case success is achieved.<\/p>\n<p>The output of the script will be the programmed assert, and the program will terminate with an exit code of <code>1<\/code>, which <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/general\/\" data-internallinksmanager029f6b8e52c=\"3\" title=\"General\" target=\"_blank\" rel=\"noopener\">general<\/a>ly means that there was some error. If the script had worked correctly, a confirmatory message would be shown and the script would terminate with an exit code of <code>0<\/code>, which generally means that there was success in whatever the script or utility was meant to do.<\/p>\n<p>So why is the script running into the assert? You may have noticed already that the variable <code>A<\/code> ran into a typo in our <code>if<\/code> statement, registered in the code as <code>AA<\/code>: a bug! We could go and check the script, and if it is as short and straightforward as the script shown here, the bug would be quickly found. But for a 5000 line program the solution is not that simple, especially not if it uses multiple threads, complex subshells etc.<\/p>\n<p>Let\u2019s debug this now with the <code>-x<\/code> option to Bash. You may remember from the second part of our Bash automation and scripting basics course that a subshell can be initiated by using an inline <code>$( ... )<\/code> set of idioms. It can also be initiated by simply typing <code>bash<\/code>, or in this case <code>bash -x<\/code> inside our top shell. In this case, we will be running the script inside our Bash subshell, with the <code>-x<\/code> option to observe what happens step by step.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9770\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/68f37e95a2b3fa9db8f15cf5918c0d2d\/p\/uploads\/2021\/02\/1925adec.png\" alt=\"Running our smalls script with bash -x\" width=\"663\" height=\"134\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>We thus executed <code>bash -x .\/test_debugging.sh<\/code> and observe that the following conditional check is being performed: <code>'[' '' == 1 -o 2 == 1 ']'<\/code>. We notice that something is amiss: the value of <code>2<\/code> is being compared with <code>1<\/code> in the second part of our conditional check, but what is happening in the first part? Something is being compared with <code>1<\/code>, but that <i>something<\/i> is\u2026 empty (as indicated by the empty string <code>''<\/code>)!<\/p>\n<p>We then check our script why that empty place is there, and why it was not filled with the value of our <code>A<\/code> variable. We quickly realize the <code>AA<\/code> instead of <code>A<\/code> mistake, correct the mistake, and the script now works fine!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9771\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/4276afc681742256adebbea817f53b15\/p\/uploads\/2021\/02\/cd037649.png\" alt=\"The corrected script with the bug fixed\" width=\"714\" height=\"239\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>A really cool thing to remember when using <code>bash -x<\/code> is that you can <code>tee<\/code> (read this as <i>\u2018copy\u2019<\/i>) the output of the Bash command by redirecting the stderr (the error output) to stdout (the standard output) and capturing the same with <code>tee<\/code>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9772\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/4e5cc872638df3a846f32c855e199690\/p\/uploads\/2021\/02\/f3e7b4a7.png\" alt=\"Using tee in combination with bash -x\" width=\"789\" height=\"275\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Here we are running our fixed script, and are redirecting the error output (<code>bash -x <\/code> sends all of it\u2019s informative debug output to stderr, the standard error output, and not to stdout) using <code>2&gt;&amp;1<\/code> (which redirects our stderr output to stdout \u2013 our standard output \u2013 instead). We then capture stdout by using <code>tee<\/code> and this will save the output to the file specified, namely <code>bash_-x_output.txt<\/code>.<\/p>\n<p>This allows a Bash developer to slowly review, in a step by step format, his or her written code. Especially when programs become complex, have functions, become multi-threaded, start background processes etc., this way of debugging can be very valuable. As an example, I tend to use <code>bash -x<\/code> about once every fortnight to debug complex scripts.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Running_Scripts_as_Background_Processes\"><\/span>Running Scripts as Background Processes<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Running a script as a background process is straightforward: simply affix &amp; to the end of the script name (with a space in between). We define <code>background.sh<\/code> as follows:<\/p>\n<pre>#!\/bin\/bash&#13;\n&#13;\nsleep 2&#13;\n<\/pre>\n<p>We then start it in the following way \u2013 to highlight the fact it is running in the background:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9773 size-full\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/e469c421a729a207cfc689bced0667f0\/p\/uploads\/2021\/02\/3eadaee3.png\" alt=\"Flow of a number of Bash commands with one of such commands being a background process\" width=\"464\" height=\"169\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>What we can see happen here is as follows: the <code>background.sh<\/code> script is started in the background (given the <code>&amp;<\/code> affixed to the script name with a space), and immediately the command prompt will return. We use this here by specifying the next command (<code>sleep 1<\/code>) directly after the <code>&amp;<\/code> background idiom, which also terminates that command a sole\/single command (in other words, <code>sleep 1<\/code> is a completely new command).<\/p>\n<p>We also terminate our <code>sleep 1<\/code> command with a customary <i>end-of-command<\/i> Bash idiom, after which we will execute an <code>echo<\/code> that the <code>sleep 1<\/code> is complete\/done. Let\u2019s next check out what happens at execution of this line.<\/p>\n<p>Immediately, our background process\/script (<code>background.sh<\/code>) is started, and this will run for about 2 seconds. The PID (process identifier) of the started background process is visually shown (namely, <code>773183<\/code> for our first (<code>[1]<\/code>) background process \u2013 and this PID will be different each time you start a background program\/process), and our <code>sleep 1<\/code> (the next instruction for execution) can now be executed as the other program has returned our prompt (whilst directly not shown here, this is what takes place when you start a background process; you immediately get the command prompt back).<\/p>\n<p>The <code>sleep 1<\/code> commences (with the <code>sleep 2<\/code> or more accurately the <code>background.sh<\/code> script still running in the background, as a different process, in a subshell started under this top or higher level shell), and terminates after 1 second. After this our <code>echo<\/code> is executed, showing us the <code>sleep 1<\/code> is complete. A second later, our <code>background.sh<\/code> process rounds up it\u2019s 2 second wait, and terminates.<\/p>\n<p>We do not see that it has terminated as the Bash shell waits for some interaction to show us <i>status messages<\/i>. Thus, as soon as we press enter, at any point after the two second sleep is over, we will see the termination of the background process as a <code>[1]+ Done .\/background.sh<\/code> status message. If you go back to the second part of our mini-series you may also see how we could have used <code>wait<\/code> here to wait for completion\/termination of the PID of the background process. It also highlights how many commands and utilities can be used in a combinatory way in Bash.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Importing_Scripts_Using_source\"><\/span>Importing Scripts Using <i>source<\/i><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Importing another script can be done easily using the Bash <code>source<\/code> command. Consider the following script <code>testsource.sh<\/code>:<\/p>\n<pre>#!\/bin\/bash&#13;\n&#13;\nsource mysource.sh&#13;\n&#13;\necho \"${MYVAR}\"&#13;\n<\/pre>\n<p>And the matching <code>mysource.sh<\/code>:<\/p>\n<pre>#!\/bin\/bash&#13;\n&#13;\nMYVAR=\"Hello CloudSavvyIT Readers!\"&#13;\n<\/pre>\n<p>If we simply make the first script (<code>testsource.sh<\/code>) executable (by using <code>chmod +x testsource.sh<\/code>), but not the second script (in fact we unset the executable flag to show clearly that this works by using <code>chmod -x<\/code> on <code>mysource.sh<\/code>), the second script is still called successfully as a result of the <code>source<\/code> command, and executed as part of the <code>testsource.sh<\/code> script:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9774\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/e0ef9d83eb7563327bb6b704ae30d9d5\/p\/uploads\/2021\/02\/7adb4762.png\" alt=\"Sourcing a script with the Bash source command\" width=\"342\" height=\"256\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>In the <code>mysource.sh<\/code> script, we set the variable <code>MYVAR<\/code> to <code>Hello CloudSavvyIT Readers!<\/code>. This script is then sourced from the <code>testsource.sh<\/code> script by using the instruction <code>source mysource.sh<\/code>. This will cause the <code>mysource.sh<\/code> to be executed at that point the code, and when complete, the <code>testsource.sh<\/code> script will continue to run, though any things set in the <code>mysource.sh<\/code> will be retained (think about this as <i>sourced from another script<\/i> to remember the operation of this more easily).<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"In_Summary\"><\/span>In Summary<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>We had a look at script debugging by using <code>bash -x<\/code> to display all executed commands. We also explored how to run a script as a background process, and learned how we can import scripts using source. <strong>Thank you<\/strong> for staying tuned for this 3 part series, of which this was the final article!<\/p>\n<p>If you are interested in learning more about Bash, how about checking our or articles Primer: Bash Loops: for, while, and until, Conditional Testing in Bash: if, then, else, elif, and Bash Functions and Local Variables\n<\/p><\/div>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.cloudsavvyit.com\/9768\/bash-automation-and-scripting-basics-part-3\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;#Bash Automation and Scripting Basics (Part 3) \u2013 CloudSavvy IT&#8221; Shutterstock\/Mopic In this final article in our three part Bash automation and scripting basics series, we will explore script debugging, running scripts as a background process, and importing other scripts using the source command. Bash Automation and Scripting Basics If you would like to start&#8230;<\/p>\n","protected":false},"author":1,"featured_media":186961,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/6a265fd5b3845c325bc5e843a1ff97bc\/p\/uploads\/2021\/02\/cc604deb.png","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-186960","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/186960","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=186960"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/186960\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/186961"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=186960"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=186960"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=186960"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}