{"id":74088,"date":"2023-01-18T06:11:39","date_gmt":"2023-01-18T14:11:39","guid":{"rendered":"https:\/\/linuxhint.com\/?p=74088"},"modified":"2023-01-21T13:01:17","modified_gmt":"2023-01-21T21:01:17","slug":"testing_strings_bash_z_n","status":"publish","type":"post","link":"https:\/\/linuxhint.com\/testing_strings_bash_z_n\/","title":{"rendered":"How to Use the Bash \u201cIf \u2013Z\u201d and \u201cIf \u2013N\u201d Statements to Test the String"},"content":{"rendered":"<div id=\"wpbody\">\n<p>The &#8220;if&#8221; statement is used in Bash for conditional branching like in other programming languages. The &#8220;if&#8221; statement can be used to check the different conditions in Bash. The different types of comparison operators, logical operators, and options are used with the &#8220;if&#8221; statement for testing.\u00a0 The uses of the &#8220;-z&#8221; and &#8220;-n&#8221; option to test the string values using the &#8220;if&#8221; statement in Bash are shown in this tutorial.<\/p>\n<h2>Using the \u201cIf -Z\u201d Statement<\/h2>\n<p>Sometimes, it is required to check if a string variable is empty or if it contains a string of zero length. There are many options in Bash to do this task. Using the &#8220;-z&#8221; option with the &#8220;if&#8221; statement is one of the ways to check whether a variable is empty or not.\u00a0 The uses of the &#8220;if -z&#8221; option are shown in the next part of the tutorial.<\/p>\n<p><strong>Example 1: Checking the \u201cIf -Z\u201d Statement Using \u201c[]\u201d<\/strong><\/p>\n<p>Create a Bash file with the following script where the use of the \u201cif \u2013z\u201d statement with the &#8220;[]&#8221; is shown. Two inputs are taken from the user. If any of the input values is empty, an error message is printed. Otherwise, the sum of the two input values are calculated and printed.<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co0\">#!\/bin\/bash<\/span><br \/>\n<span class=\"co0\">#Read the first number<\/span><br \/>\n<span class=\"kw2\">read<\/span> <span class=\"re5\">-p<\/span> <span class=\"st0\">&quot;Enter the first number : &quot;<\/span> n1<br \/>\n<span class=\"co0\">#Read the second number<\/span><br \/>\n<span class=\"kw2\">read<\/span> <span class=\"re5\">-p<\/span> <span class=\"st0\">&quot;Enter the second number : &quot;<\/span> n2<br \/>\n<br \/>\n<span class=\"co0\">#Check any input is empty or not<\/span><br \/>\n<span class=\"kw1\">if<\/span> <span class=\"br0\">&#91;<\/span><span class=\"br0\">&#91;<\/span> <span class=\"re5\">-z<\/span> <span class=\"st0\">&quot;<span class=\"es2\">$n1<\/span>&quot;<\/span> <span class=\"sy0\">||<\/span> <span class=\"re5\">-z<\/span> <span class=\"st0\">&quot;<span class=\"es2\">$n2<\/span>&quot;<\/span> <span class=\"br0\">&#93;<\/span><span class=\"br0\">&#93;<\/span><br \/>\n<span class=\"kw1\">then<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co0\">#Print the error message<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;The first or second number is empty.&quot;<\/span><br \/>\n<span class=\"kw1\">else<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co0\">#Calculate the sum<\/span><br \/>\n&nbsp; &nbsp; <span class=\"re2\">sum<\/span>=$<span class=\"br0\">&#40;<\/span><span class=\"br0\">&#40;<\/span><span class=\"re1\">$n1<\/span>+<span class=\"re1\">$n2<\/span><span class=\"br0\">&#41;<\/span><span class=\"br0\">&#41;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co0\">#Print the summation value<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;The sum of <span class=\"es2\">$n1<\/span> and <span class=\"es2\">$n2<\/span> is <span class=\"es2\">$sum<\/span>.&quot;<\/span><br \/>\n<span class=\"kw1\">fi<\/span><\/div><\/div>\n<p>&nbsp;<br \/>\n<strong>Output:<\/strong><\/p>\n<p>The following output appears if the script is executed without any argument:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/1-2.png\" alt=\"\" width=\"922\" height=\"120\" class=\"alignnone size-full wp-image-281414\" srcset=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/1-2.png 922w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/1-2-300x39.png 300w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/1-2-768x100.png 768w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/1-2-810x105.png 810w\" sizes=\"(max-width: 922px) 100vw, 922px\" \/><br \/>\nThe following output appears if the script is executed with one argument:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/2-1.png\" alt=\"\" width=\"922\" height=\"134\" class=\"alignnone size-full wp-image-281415\" srcset=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/2-1.png 922w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/2-1-300x44.png 300w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/2-1-768x112.png 768w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/2-1-810x118.png 810w\" sizes=\"(max-width: 922px) 100vw, 922px\" \/><br \/>\nThe following output appears if the script is executed with two arguments:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/3-1.png\" alt=\"\" width=\"918\" height=\"124\" class=\"alignnone size-full wp-image-281416\" srcset=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/3-1.png 918w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/3-1-300x41.png 300w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/3-1-768x104.png 768w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/3-1-810x109.png 810w\" sizes=\"(max-width: 918px) 100vw, 918px\" \/><br \/>\n<strong>Example 2: Checking the \u201cIf -Z\u201d Statement with the \u201cTest\u201d Command<\/strong><\/p>\n<p>Create a Bash file with the following script where the use of the \u201cif \u2013z\u201d statement with the \u201c<strong>test<\/strong>\u201d command is shown. One input is taken from the user that must be numeric. If the input value is empty, an error message is printed. If the input value is non-empty but not contains a numeric value, another error message is printed. If an integer number is taken as an input, the input value is printed.<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co0\">#!\/bin\/bash<\/span><br \/>\n<span class=\"co0\">#Read the age value<\/span><br \/>\n<span class=\"kw2\">read<\/span> <span class=\"re5\">-p<\/span> <span class=\"st0\">&quot;Enter your age: &quot;<\/span> age<br \/>\n<br \/>\n<span class=\"co0\">#Check whether the input value is empty or not<\/span><br \/>\n<span class=\"kw1\">if<\/span> <span class=\"kw3\">test<\/span> <span class=\"re5\">-z<\/span> <span class=\"st0\">&quot;<span class=\"es2\">$age<\/span>&quot;<\/span> <br \/>\n<span class=\"kw1\">then<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co0\">#Print the error message for empty<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;The input value is empty.&quot;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw3\">exit<\/span><br \/>\n<span class=\"kw1\">fi<\/span><br \/>\n<br \/>\n<span class=\"co0\">#Check whether the input value is a number or not <\/span><br \/>\n<span class=\"kw1\">if<\/span> <span class=\"sy0\">!<\/span> <span class=\"br0\">&#91;<\/span><span class=\"br0\">&#91;<\/span> <span class=\"re1\">$age<\/span> =~ ^<span class=\"br0\">&#91;<\/span><span class=\"nu0\">0<\/span>-<span class=\"nu0\">9<\/span><span class=\"br0\">&#93;<\/span>+$ <span class=\"br0\">&#93;<\/span><span class=\"br0\">&#93;<\/span>; <span class=\"kw1\">then<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co0\">#Print the error message for non-numeric data<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;The age value must be a number.&quot;<\/span><br \/>\n<span class=\"kw1\">else<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co0\">#Print the input value<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;You are <span class=\"es2\">$age<\/span> years old.&quot;<\/span><br \/>\n<span class=\"kw1\">fi<\/span><\/div><\/div>\n<p>&nbsp;<br \/>\n<strong>Output:<\/strong><\/p>\n<p>The following output apepars if the script is executed with the numeric input value:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/4-1.png\" alt=\"\" width=\"918\" height=\"104\" class=\"alignnone size-full wp-image-281417\" srcset=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/4-1.png 918w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/4-1-300x34.png 300w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/4-1-768x87.png 768w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/4-1-810x92.png 810w\" sizes=\"(max-width: 918px) 100vw, 918px\" \/><br \/>\nThe following output appears if the script is executed with the string input value:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/5-1.png\" alt=\"\" width=\"922\" height=\"108\" class=\"alignnone size-full wp-image-281418\" srcset=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/5-1.png 922w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/5-1-300x35.png 300w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/5-1-768x90.png 768w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/5-1-810x95.png 810w\" sizes=\"(max-width: 922px) 100vw, 922px\" \/><\/p>\n<h2>Using the \u201cIf -N\u201d Statement<\/h2>\n<p>Sometimes, it is required to check if a string variable is non-empty or if it contains a string value more than zero length. There are many options in Bash to do this task. Using the &#8220;-n&#8221; option with the &#8220;if&#8221; statement is one of the ways to check whether a variable is non-empty or not.\u00a0 The uses of the &#8220;if -n&#8221; option are shown in the next part of the tutorial.<\/p>\n<p><strong>Example 1: Checking the \u201cIf -N\u201d Statement Using \u201c[]\u201d<\/strong><\/p>\n<p>Create a Bash file with the following script where the use of the \u201cif \u2013n\u201d statement with the \u201c[]\u201d is shown. One input value is taken from the user. If the input value is empty, an error message is printed. Otherwise, the value of the input is printed.<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co0\">#!\/bin\/bash<\/span><br \/>\n<span class=\"co0\">#Read the book name<\/span><br \/>\n<span class=\"kw2\">read<\/span> <span class=\"re5\">-p<\/span> <span class=\"st0\">&quot;Enter the book name: &quot;<\/span> book<br \/>\n<br \/>\n<span class=\"co0\">#Check if the input is non-zero or not<\/span><br \/>\n<span class=\"kw1\">if<\/span> <span class=\"sy0\">!<\/span> <span class=\"br0\">&#91;<\/span> <span class=\"re5\">-n<\/span> <span class=\"st0\">&quot;<span class=\"es2\">$book<\/span>&quot;<\/span> <span class=\"br0\">&#93;<\/span><br \/>\n<span class=\"kw1\">then<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co0\">#Print the error message<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;Book name can't be empty.&quot;<\/span><br \/>\n<span class=\"kw1\">else<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co0\">#Print the input value<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;The book name is <span class=\"es2\">$book<\/span>.&quot;<\/span><br \/>\n<span class=\"kw1\">fi<\/span><\/div><\/div>\n<p>&nbsp;<br \/>\n<strong>Output:<\/strong><\/p>\n<p>The following output appears if the script is executed with any input value:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/6-1.png\" alt=\"\" width=\"916\" height=\"99\" class=\"alignnone size-full wp-image-281419\" srcset=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/6-1.png 916w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/6-1-300x32.png 300w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/6-1-768x83.png 768w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/6-1-810x88.png 810w\" sizes=\"(max-width: 916px) 100vw, 916px\" \/><br \/>\nThe following output appears if the script is executed with a string input value:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/7.png\" alt=\"\" width=\"918\" height=\"98\" class=\"alignnone size-full wp-image-281420\" srcset=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/7.png 918w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/7-300x32.png 300w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/7-768x82.png 768w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/7-810x86.png 810w\" sizes=\"(max-width: 918px) 100vw, 918px\" \/><br \/>\n<strong>Example 2: Checking the \u201cIf -N\u201d Statement with the \u201cTest\u201d Command<\/strong><\/p>\n<p>Create a Bash file with the following script where the use of the \u201cif \u2013n\u201d statement with the \u201ctest\u201d command is shown. The first input is a string and the second input is numeric. If both input values are non-empty, an error message is printed. If the second input value is non-numeric, otherwise, the input values are printed.<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;height:100%;\"><div class=\"bash codecolorer\"><span class=\"co0\">#!\/bin\/bash<\/span><br \/>\n<span class=\"co0\">#Read the book name<\/span><br \/>\n<span class=\"kw2\">read<\/span> <span class=\"re5\">-p<\/span> <span class=\"st0\">&quot;Enter the book name: &quot;<\/span> book<br \/>\n<br \/>\n<span class=\"co0\">#Read the book name<\/span><br \/>\n<span class=\"kw2\">read<\/span> <span class=\"re5\">-p<\/span> <span class=\"st0\">&quot;Enter the book price: &quot;<\/span> price<br \/>\n<br \/>\n<span class=\"co0\">#Check whether the input is non-zero or not<\/span><br \/>\n<span class=\"kw1\">if<\/span> <span class=\"kw3\">test<\/span> <span class=\"re5\">-n<\/span> <span class=\"st0\">&quot;<span class=\"es2\">$book<\/span>&quot;<\/span> <span class=\"sy0\">&amp;&amp;<\/span> <span class=\"kw3\">test<\/span> <span class=\"re5\">-n<\/span> <span class=\"st0\">&quot;<span class=\"es2\">$price<\/span>&quot;<\/span> <br \/>\n<span class=\"kw1\">then<\/span><br \/>\n&nbsp; &nbsp;<span class=\"co0\">#Check whether the input value is a number or not <\/span><br \/>\n&nbsp; &nbsp;<span class=\"kw1\">if<\/span> <span class=\"sy0\">!<\/span> <span class=\"br0\">&#91;<\/span><span class=\"br0\">&#91;<\/span> <span class=\"re1\">$price<\/span> =~ ^<span class=\"br0\">&#91;<\/span><span class=\"nu0\">0<\/span>-<span class=\"nu0\">9<\/span><span class=\"br0\">&#93;<\/span>+$ <span class=\"br0\">&#93;<\/span><span class=\"br0\">&#93;<\/span>; <span class=\"kw1\">then<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;<span class=\"co0\">#Print the error message for non-numeric data<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;<span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;The price value must be a number.&quot;<\/span><br \/>\n&nbsp; &nbsp;<span class=\"kw1\">else<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;<span class=\"co0\">#Print the input values<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;<span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;Book name is <span class=\"es2\">$book<\/span>.&quot;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;<span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;Book price is <span class=\"es2\">$price<\/span>.&quot;<\/span><br \/>\n&nbsp; &nbsp;<span class=\"kw1\">fi<\/span><br \/>\n<span class=\"kw1\">else<\/span><br \/>\n&nbsp; &nbsp;<span class=\"co0\">#Print the error message<\/span><br \/>\n&nbsp; &nbsp;<span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;Book name or price can't be empty.&quot;<\/span><br \/>\n<span class=\"kw1\">fi<\/span><\/div><\/div>\n<p>&nbsp;<br \/>\n<strong>Output:<\/strong><\/p>\n<p>The following output appears if the script is executed with two empty input values:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/8.png\" alt=\"\" width=\"921\" height=\"125\" class=\"alignnone size-full wp-image-281421\" srcset=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/8.png 921w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/8-300x41.png 300w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/8-768x104.png 768w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/8-810x110.png 810w\" sizes=\"(max-width: 921px) 100vw, 921px\" \/><br \/>\nThe following output appears if the script is executed with one empty input value:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/9.png\" alt=\"\" width=\"924\" height=\"119\" class=\"alignnone size-full wp-image-281422\" srcset=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/9.png 924w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/9-300x39.png 300w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/9-768x99.png 768w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/9-810x104.png 810w\" sizes=\"(max-width: 924px) 100vw, 924px\" \/><br \/>\nThe following output appears if the script is executed with two non-empty valid input values:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/10.png\" alt=\"\" width=\"923\" height=\"139\" class=\"alignnone size-full wp-image-281423\" srcset=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/10.png 923w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/10-300x45.png 300w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/10-768x116.png 768w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/10-810x122.png 810w\" sizes=\"(max-width: 923px) 100vw, 923px\" \/><br \/>\nThe following output appears if the script is executed with two non-empty values and an invalid price value:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/11.png\" alt=\"\" width=\"924\" height=\"124\" class=\"alignnone size-full wp-image-281424\" srcset=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/11.png 924w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/11-300x40.png 300w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/11-768x103.png 768w, https:\/\/linuxhint.com\/wp-content\/uploads\/2020\/10\/11-810x109.png 810w\" sizes=\"(max-width: 924px) 100vw, 924px\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p>The uses of both \u201cif \u2013z\u201d and \u201cif \u2013n\u201d statements are explained in this tutorial using multiple examples to help the Bash users to properly apply these statements in their script.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Practical guide on the uses of both if z and if n statements to help the Bash users to properly apply these statements in their script using multiple examples.<\/p>\n","protected":false},"author":33,"featured_media":282090,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1561],"tags":[],"class_list":["post-74088","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bash-programming"],"_links":{"self":[{"href":"https:\/\/linuxhint.com\/wp-json\/wp\/v2\/posts\/74088","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxhint.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhint.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhint.com\/wp-json\/wp\/v2\/users\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhint.com\/wp-json\/wp\/v2\/comments?post=74088"}],"version-history":[{"count":0,"href":"https:\/\/linuxhint.com\/wp-json\/wp\/v2\/posts\/74088\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxhint.com\/wp-json\/wp\/v2\/media\/282090"}],"wp:attachment":[{"href":"https:\/\/linuxhint.com\/wp-json\/wp\/v2\/media?parent=74088"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhint.com\/wp-json\/wp\/v2\/categories?post=74088"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhint.com\/wp-json\/wp\/v2\/tags?post=74088"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}