{"id":34119,"date":"2024-01-15T03:37:58","date_gmt":"2024-01-15T03:37:58","guid":{"rendered":"https:\/\/linuxsimply.com\/?p=34119"},"modified":"2024-04-16T07:57:18","modified_gmt":"2024-04-16T07:57:18","slug":"bash-array-append","status":"publish","type":"post","link":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/","title":{"rendered":"How to Append to an Array in Bash? [4 Easy Methods]"},"content":{"rendered":"<p>You can use the following <strong>4<\/strong> methods to <strong>append to an array<\/strong> in Bash:<\/p>\n<ol>\n<li>Using the shorthand operator (+=): <code class=\"\" data-line=\"\">array_name+=(&#039;element to append&#039;)<\/code>.<\/li>\n<li>Defining the last index: <code class=\"\" data-line=\"\">array_name[${#array_name[@]}]=&#039;element to append&#039;<\/code>.<\/li>\n<li>Using bracket (): <code class=\"\" data-line=\"\">array_name=(${array_name[@]} &#039;element to append&#039;)<\/code>.<\/li>\n<li>Via array concatenation: <code class=\"\" data-line=\"\">array1=(${array1[@]} ${array2[@]})<\/code>.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\"><strong>Append to an array in Bash<\/strong> refers to adding elements to a Bash array. It is a fundamental yet essential operation for the seamless addition of data within the array data structure. This article discusses <strong>4 <\/strong>easy methods on <strong>how to append to an array<\/strong> in Bash. It discusses the appending of single elements to an array as well as appending multiple elements to a Bash array. It also mentions the methods to append an entire array to another array. Additionally, it mentions <strong>2 <\/strong>common mistakes that may occur during the append operation in Bash arrays with solutions and tips.<\/p>\n<div class=\"su-button-center\"><a href=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/bash-array-append-practice-files.zip\" class=\"su-button su-button-style-default\" style=\"color:#000000;background-color:#E8F9FF;border-color:#bac8cc;border-radius:56px\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"color:#000000;padding:8px 26px;font-size:20px;line-height:30px;border-color:#effbff;border-radius:56px;text-shadow:0px 0px 0px #000000\"><i class=\"sui sui-download\" style=\"font-size:20px;color:#1AA1D6\"><\/i> Practice Files to Append to Bash Array\u00a0 <\/span><\/a><\/div>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" 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: #999;color:#999\" 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><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#1_Using_the_Shorthand_Operator_%E2%80%9C%E2%80%9D\" >1. Using the Shorthand Operator \u201c+=\u201d<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#Append_Multiple_Elements\" >Append Multiple Elements<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#2_Defining_the_Last_Index\" >2. Defining the Last Index<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#3_Append_an_Array_Using_Parenthesis\" >3. Append an Array Using Parenthesis<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#4_Using_Array_Concatenation\" >4. Using Array Concatenation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#How_to_Append_Array_to_Another_Array_in_Bash\" >How to Append Array to Another Array in Bash?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#2_Ways_to_Avoid_Common_Mistakes_When_Appending_to_Bash_Arrays\" >2 Ways to Avoid Common Mistakes When Appending to Bash Arrays<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#1_Handling_Spaces_in_Bash_Array_Elements\" >1. Handling Spaces in Bash Array Elements<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#2_Escape_Overwriting_Existing_Arrays\" >2. Escape Overwriting Existing Arrays<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#Conclusion\" >Conclusion<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#Frequently_Asked_Questions\" >Frequently Asked Questions<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#How_to_add_elements_to_a_Bash_array_at_specific_positions\" >How to add elements to a Bash array at specific positions?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#Can_I_append_an_array_to_another_array_in_Bash\" >Can I append an array to another array in Bash?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#Whats_the_difference_between_arrayelement_and_arrayelement\" >What&#8217;s the difference between array+=element and array+=(element)?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#How_do_I_append_to_an_array_in_Bash\" >How do I append to an array in Bash?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#Is_it_possible_to_append_multiple_arrays_to_another_Bash_array\" >Is it possible to append multiple arrays to another Bash array?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#What_is_meant_by_Bash_array_append\" >What is meant by Bash array append?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"1_Using_the_Shorthand_Operator_%E2%80%9C%E2%80%9D\"><\/span>1. Using the Shorthand Operator \u201c+=\u201d<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">Use the <code class=\"\" data-line=\"\">+=<\/code> operator to append elements to a <a href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/\" target=\"_blank\" rel=\"noopener\"><strong>Bash array<\/strong><\/a>. The full syntax is like the following:<\/p>\n<p><code class=\"\" data-line=\"\">array+=(elements_to_append)<\/code><\/p>\n<p>Let\u2019s see a simple example of appending to an array in bash using the <strong>+=<\/strong> operator:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">#!\/bin\/bash\n\n#The main array\ndigit=(one two three)\n\n#prints array with 3 existing elements\necho &quot;array before appending: ${digit[@]}&quot;\n\n#new value to append\ndigit+=(four)\n\n#Prints array with newly added element four\necho &quot;array after appending: ${digit[@]}&quot;\n<\/code><\/pre>\n<div class=\"su-box su-box-style-default\" id=\"\" style=\"border-color:#aeb0b3;border-radius:0px;max-width:none\"><div class=\"su-box-title\" style=\"background-color:#E1E3E6;color:#000000;border-top-left-radius:0px;border-top-right-radius:0px\"> EXPLANATION<\/div><div class=\"su-box-content su-u-clearfix su-u-trim\" style=\"border-bottom-left-radius:0px;border-bottom-right-radius:0px\">\n<p style=\"text-align: justify;\">In this script after the declaration of the array <strong>digit<\/strong> with 3 items, the expression <code class=\"\" data-line=\"\">digit+=(four)<\/code> adds the new element four to the end of the array. This is evident after printing the array using the <a href=\"https:\/\/linuxsimply.com\/echo-command-in-linux\/#Example_3_Using_the_echo_Command_to_View_Variables_in_the_Command_Line\" target=\"_blank\" rel=\"noopener\"><strong>echo command<\/strong><\/a>.<\/div><\/div><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-34120\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/1-appendsingle.png\" alt=\"append single element to bash array\" width=\"825\" height=\"214\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/1-appendsingle.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/1-appendsingle-300x78.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/1-appendsingle-768x199.png 768w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/>As you can see the above script appends a single entity <strong>four <\/strong>to the array <strong>digit<\/strong>.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Append_Multiple_Elements\"><\/span>Append Multiple Elements<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">Apart from appending a single element to an array, it might become necessary to append multiple elements to a Bash array. Fortunately, Bash arrays provide the following syntax to append more than one element:<\/p>\n<p><code class=\"\" data-line=\"\">array_name+=(element1 element2 elementN)<\/code><\/p>\n<p>Here\u2019s an example of appending multiple elements to a Bash array:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">#!\/bin\/bash\n\n#The main array\ndigit=(one two three)\n\n#prints array with 3 existing elements\necho &quot;array before appending: ${digit[@]}&quot;\n\n#new value to append\ndigit+=(four five six seven)\n\n#Prints array with newly added element four\necho &quot;array after appending: ${digit[*]}&quot;\n<\/code><\/pre>\n<div class=\"su-box su-box-style-default\" id=\"\" style=\"border-color:#aeb0b3;border-radius:0px;max-width:none\"><div class=\"su-box-title\" style=\"background-color:#E1E3E6;color:#000000;border-top-left-radius:0px;border-top-right-radius:0px\"> EXPLANATION<\/div><div class=\"su-box-content su-u-clearfix su-u-trim\" style=\"border-bottom-left-radius:0px;border-bottom-right-radius:0px\">\n<p style=\"text-align: justify;\">In the script, the expression <code class=\"\" data-line=\"\">digit+=(four five six seven)<\/code> adds 4 new elements <strong>(four five six seven)<\/strong> at once to the existing array <strong>digit<\/strong> with 3 elements. Finally, prints the array twice to verify multiple appending to the array.<\/div><\/div><img decoding=\"async\" class=\"aligncenter size-full wp-image-34121\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/1-multi-append.png\" alt=\"bash array append multiple elements\" width=\"825\" height=\"184\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/1-multi-append.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/1-multi-append-300x67.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/1-multi-append-768x171.png 768w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<p style=\"text-align: justify;\">See from the above image that the script appends 4 new elements<strong>\u00a0<\/strong>to the array <strong>digit<\/strong>.<\/p>\n<p style=\"text-align: justify;\"><div class=\"su-note\"  style=\"border-color:#cedfe2;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#E8F9FC;border-color:#ffffff;color:#333333;\">\n<p style=\"text-align: justify;\"><strong>Note:<\/strong> Though using the <strong>+=<\/strong> operator is a very simple and fast method to append to an array, remaining cautious is recommended. For instance, using the <strong>=<\/strong> instead of the <strong>=+<\/strong> operator can potentially overwrite the array. So, always ensure that you are using the correct, <strong>+=<\/strong> operator, to append to a Bash array. <\/div><\/div>\n<h2><span class=\"ez-toc-section\" id=\"2_Defining_the_Last_Index\"><\/span>2. Defining the Last Index<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">Another simple way to append an element to an array is to add data explicitly to the last index. Now, to append an element using the last index, use the expression ${#array_name[@]} with the syntax: <code class=\"\" data-line=\"\">array_name[${#array_name[@]}]=&quot;Data to append&quot;<\/code>. This will append the new <strong>Data to append<\/strong> to the end of the array by defining the last index. Here\u2019s an example:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">#!\/bin\/bash\n\n#Main Array to work with\nLinux=(&quot;Ubuntu&quot; &quot;Debian&quot; &quot;openSUSE&quot;)\n\n#print main array\necho &quot;Before append: ${Linux[*]}&quot;\n\n#Value RHEL to append \nLinux[${#Linux[@]}]=&quot;RHEL&quot;\n\n#Printing the values of an array\necho &quot;After append: ${Linux[*]}&quot;\n<\/code><\/pre>\n<div class=\"su-box su-box-style-default\" id=\"\" style=\"border-color:#aeb0b3;border-radius:0px;max-width:none\"><div class=\"su-box-title\" style=\"background-color:#E1E3E6;color:#000000;border-top-left-radius:0px;border-top-right-radius:0px\"> EXPLANATION<\/div><div class=\"su-box-content su-u-clearfix su-u-trim\" style=\"border-bottom-left-radius:0px;border-bottom-right-radius:0px\">\n<p style=\"text-align: justify;\">The above script declares the array <strong>Linux <\/strong>with 3 elements using <code class=\"\" data-line=\"\">Linux=(&quot;Ubuntu&quot; &quot;Debian&quot; &quot;openSUSE&quot;)<\/code>. Then, in the expression, <code class=\"\" data-line=\"\">Linux[${#Linux[@]}]=&quot;RHEL&quot;<\/code>, <strong>${#Linux[@]}<\/strong> finds out the total number of array elements which is <strong>3<\/strong> and this is used as the index of the fourth element. Thus, effectively the final expression becomes <code class=\"\" data-line=\"\">Linux[3]=&quot;RHEL&quot;<\/code> that appends <strong>RHEL <\/strong>to the <strong>Linux <\/strong>array as the end-most element.<\/div><\/div><img decoding=\"async\" class=\"aligncenter size-full wp-image-34122\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/3-append-last-index.png\" alt=\"bash array append defining last index\" width=\"825\" height=\"142\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/3-append-last-index.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/3-append-last-index-300x52.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/3-append-last-index-768x132.png 768w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/>As you can see, defining the last index in the above script appends an element successfully to an array.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"3_Append_an_Array_Using_Parenthesis\"><\/span>3. Append an Array Using Parenthesis<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">An array element can be appended by using the array variable name and the new element value enclosed within the first bracket (). The full syntax is: <code class=\"\" data-line=\"\">array_name=(${array_name[@]} &quot;element to append&quot;)<\/code>.<\/p>\n<p>Below is an example script to append a value to a Bash array using first brackets ():<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">#!\/bin\/bash\n\n# Declare a string array\nfruit=(&quot;orange&quot; &quot;watermelon&quot; &quot;apple&quot;)\n\n#print the array\necho &quot;before append: ${fruit[@]}&quot;\n\n# Add new element at the end of the array using parenthesis () \nfruit=(${fruit[@]} &quot;grape&quot;)\n\n#print the array elements in a single line \necho &quot;After append: ${fruit[@]}&quot;\n<\/code><\/pre>\n<div class=\"su-box su-box-style-default\" id=\"\" style=\"border-color:#aeb0b3;border-radius:0px;max-width:none\"><div class=\"su-box-title\" style=\"background-color:#E1E3E6;color:#000000;border-top-left-radius:0px;border-top-right-radius:0px\"> EXPLANATION<\/div><div class=\"su-box-content su-u-clearfix su-u-trim\" style=\"border-bottom-left-radius:0px;border-bottom-right-radius:0px\">\n<p style=\"text-align: justify;\">In the script, after the initialization of the array <code class=\"\" data-line=\"\">fruit=(&quot;orange&quot; &quot;watermelon&quot; &quot;apple&quot;)<\/code>, the expression <code class=\"\" data-line=\"\">fruit=(${fruit[@]} &quot;grape&quot;)<\/code> first expands the original array and then appends <strong>grape<\/strong> as the new element at the end <strong>(after index 3)<\/strong>. As a result, the fruit array now has 4 elements that are visible after printing the array using the command <code class=\"\" data-line=\"\">echo &quot;After append: ${fruit[@]}&quot;<\/code>.<\/div><\/div><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-34123\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/4-bracktes-append.png\" alt=\"append elements to array using brackets\" width=\"825\" height=\"132\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/4-bracktes-append.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/4-bracktes-append-300x48.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/4-bracktes-append-768x123.png 768w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<p style=\"text-align: justify;\">Terminal output to append to an array using first brackets <strong>()<\/strong>.<\/p>\n<div class=\"su-note\"  style=\"border-color:#cedfe2;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#E8F9FC;border-color:#ffffff;color:#333333;\">\n<p style=\"text-align: justify;\"><strong>Note:<\/strong> To append multiple items using brackets, mention more than one element in the syntax above like this format: <code class=\"\" data-line=\"\">array_name=(${array_name[@]} &quot;element1&quot; &quot;element2&quot; &quot;elementN&quot;)<\/code> <\/div><\/div>\n<h2><span class=\"ez-toc-section\" id=\"4_Using_Array_Concatenation\"><\/span>4. Using Array Concatenation<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\"><strong>Array concatenation<\/strong> is the process of combining two arrays to form a single array. This is very easy to achieve using the syntax <code class=\"\" data-line=\"\">array1=(${array1[@]} ${array2[@]})<\/code> which will expand and concatenate <strong>array1<\/strong> and <strong>array2<\/strong> into <strong>array1<\/strong>. Let\u2019s see array concatenation into action to append elements to a Bash array:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">#!\/bin\/bash\n\n#main array\ndigit=(1 2 3)\n\n#print array\necho &quot;array1: ${digit[@]}&quot;\n\n#array elements to append\nalsoDigit=(5 6 7)\n\n#print array2\necho &quot;array2: ${alsoDigit[@]}&quot;\n\n#array appending via array concatenation\ndigit=(${digit[@]} ${alsoDigit[@]})\n\n#print the new array \necho &quot;the new array: ${digit[@]}&quot;\n<\/code><\/pre>\n<div class=\"su-box su-box-style-default\" id=\"\" style=\"border-color:#aeb0b3;border-radius:0px;max-width:none\"><div class=\"su-box-title\" style=\"background-color:#E1E3E6;color:#000000;border-top-left-radius:0px;border-top-right-radius:0px\"> EXPLANATION<\/div><div class=\"su-box-content su-u-clearfix su-u-trim\" style=\"border-bottom-left-radius:0px;border-bottom-right-radius:0px\">\n<p style=\"text-align: justify;\">Here, The two arrays <strong>digit<\/strong> and <strong>alsoDigit<\/strong> are expanded and concatenated inside the existing array-type variable <strong>digit<\/strong>. After printing the arrays, it\u2019s clear that the concatenation method appends elements to the Bash array.<\/div><\/div><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-34124\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/5-concat.png\" alt=\"array concatenation to append elements to array\" width=\"825\" height=\"162\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/5-concat.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/5-concat-300x59.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/5-concat-768x151.png 768w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<p>Upon execution, the script prints both individual &amp; concatenated arrays.<\/p>\n<p style=\"text-align: justify;\"><div class=\"su-note\"  style=\"border-color:#cedfe2;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#E8F9FC;border-color:#ffffff;color:#333333;\">\n<p style=\"text-align: justify;\"><strong>Note:<\/strong> To concatenate and append two arrays to a new array variable, use, for instance, the syntax: <code class=\"\" data-line=\"\">Numbers=(${digit[@]} ${alsoDigit[@]})<\/code><\/div><\/div>\n<h2><span class=\"ez-toc-section\" id=\"How_to_Append_Array_to_Another_Array_in_Bash\"><\/span>How to Append Array to Another Array in Bash?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">Apart from appending individual or multiple data elements, the smart approach of using the shorthand operator <strong>+=<\/strong> is capable of appending an array to another array. The complete syntax is <code class=\"\" data-line=\"\">array1+=(${array2[@]})<\/code> where the <strong>+=<\/strong> operator appends the <strong>array2<\/strong> to the existing <strong>array1<\/strong>.<\/p>\n<p>Here\u2019s how to append an array to another array in Bash:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">#!\/bin\/bash\n\n# Main array\nmain_array=(&quot;Apple&quot; &quot;Orange&quot; &quot;Banana&quot;)\necho &quot;main array: ${main_array[@]}&quot;\n\n# Array to append\nto_append=(&quot;Grapes&quot; &quot;Mango&quot;)\necho &quot;to_append: ${to_append[@]}&quot;\n\n# append array to array using compound assignment +=\nmain_array+=(&quot;${to_append[@]}&quot;)\n\n# Print the updated array\necho &quot;updated array: ${main_array[@]}&quot;\n<\/code><\/pre>\n<div class=\"su-box su-box-style-default\" id=\"\" style=\"border-color:#aeb0b3;border-radius:0px;max-width:none\"><div class=\"su-box-title\" style=\"background-color:#E1E3E6;color:#000000;border-top-left-radius:0px;border-top-right-radius:0px\"> EXPLANATION<\/div><div class=\"su-box-content su-u-clearfix su-u-trim\" style=\"border-bottom-left-radius:0px;border-bottom-right-radius:0px\">\n<p style=\"text-align: justify;\">In the script, the array <strong>to_append<\/strong> is successfully appended by using the expression <code class=\"\" data-line=\"\">main_array+=(&quot;${to_append[@]}&quot;)<\/code> to the existing <strong>main_array<\/strong> with initially 3 elements. Finally, printing the array in the terminal shows that the array contains 5 elements with 2 new elements at the end.<\/div><\/div><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-34125\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/6-append-array.png\" alt=\"append array to another array\" width=\"825\" height=\"163\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/6-append-array.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/6-append-array-300x59.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/6-append-array-768x152.png 768w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/>In the above image, the array <strong>to_append<\/strong> has been appended to the <strong>main_array<\/strong> to form an array of 5 elements from 3 existing elements.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"2_Ways_to_Avoid_Common_Mistakes_When_Appending_to_Bash_Arrays\"><\/span>2 Ways to Avoid Common Mistakes When Appending to Bash Arrays<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">The append operation in Bash array is very simple which you already have learned. However, you might encounter <strong>2 common pitfalls<\/strong> during appending to Bash arrays and employ solutions like the following:<\/p>\n<h3><span class=\"ez-toc-section\" id=\"1_Handling_Spaces_in_Bash_Array_Elements\"><\/span>1. Handling Spaces in Bash Array Elements<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">One common issue arises when you have to handle array elements containing spaces. Look at the below example:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">tennis=(&quot;nadal&quot; &quot;roddick&quot; &quot;roger federer&quot;)\ntennis+=(&quot;sampras&quot; &quot;suffin&quot;)\necho ${tennis[*]}\necho &quot;length: ${#tennis[*]}&quot;\n<\/code><\/pre>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-34126\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/7-pitfall1.png\" alt=\"handling spaced elements to append \" width=\"825\" height=\"154\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/7-pitfall1.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/7-pitfall1-300x56.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/7-pitfall1-768x143.png 768w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/>In the above example, when the array elements and length are printed, Bash treats <strong>&#8216;roger federer&#8217;<\/strong> as a single element, which is desirable in this case.<\/p>\n<p style=\"text-align: justify;\">However, if the multi-word element is not quoted around, then it will be treated as 2 other elements rather than a single one like the following:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">#!\/bin\/bash\ntennis=(&quot;nadal&quot; &quot;roddick&quot; roger federer)\ntennis+=(&quot;sampras&quot; &quot;suffin&quot;)\necho ${tennis[*]}\necho &quot;length: ${#tennis[*]}&quot;\n<\/code><\/pre>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-34127\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/8-pitfall1_2nd.png\" alt=\"spaced element without space treated as different array elements\" width=\"825\" height=\"159\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/8-pitfall1_2nd.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/8-pitfall1_2nd-300x58.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/8-pitfall1_2nd-768x148.png 768w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<p style=\"text-align: justify;\">In the above image, the array length is now 6 instead of 5 since Bash treats <strong>roger<\/strong> and <strong>federer<\/strong> as 2 different array elements due to the absence of quotes around.<\/p>\n<p style=\"text-align: justify;\"><strong>Solution<\/strong>: Always <strong>use<\/strong> <strong>quotes<\/strong> around array elements that contain space to ensure Bash treats them as a single data value.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"2_Escape_Overwriting_Existing_Arrays\"><\/span>2. Escape Overwriting Existing Arrays<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">Another common error is mistakenly using the equal sign <strong>(=)<\/strong> instead of the <strong>+=<\/strong> operator in the array append syntax where the syntax becomes <code class=\"\" data-line=\"\">array=(element to append)<\/code> and accidentally overwrites the array instead of appending it. See the script below:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">#!\/bin\/bash\ntennis=(&#039;nadal&#039; &#039;roddick&#039; &#039;federer&#039;)\ntennis=(&#039;sampras&#039; &#039;suffin&#039;)\necho ${tennis[*]}\n<\/code><\/pre>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-34128\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/9-pitfall2.png\" alt=\"overwrite array mistakenly instead of appending to array\" width=\"700\" height=\"119\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/9-pitfall2.png 700w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/9-pitfall2-300x51.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/>The above script prints <strong>sampras<\/strong> <strong>suffin<\/strong> instead of printing all the 5 elements <strong>nadal roddick federer sampras suffin<\/strong> since the use of <strong>=<\/strong> in the syntactical format <strong>tennis=(&#8216;sampras&#8217; &#8216;suffin&#8217;)<\/strong> has overwritten the previous array with 2 elements.<\/p>\n<p style=\"text-align: justify;\"><strong>Solution<\/strong>: Double-check to make sure you are using the<strong> +=<\/strong> operator in appending to the array. Otherwise, you might accidentally end up overwriting the array.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">This article discusses the concept of <strong>how to append to arrays\u00a0in Bash<\/strong> with <strong>4<\/strong> different methods. It mentions appending single, or multiple elements to an array. it sheds light on the advanced concept of appending arrays to another Bash array. In addition, it mentions <strong>2<\/strong> common pitfalls with effective solutions to ensure smooth appending to Bash arrays. Hope this article aids your journey to mastering Bash arrays.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Frequently_Asked_Questions\"><\/span>Frequently Asked Questions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"How_to_add_elements_to_a_Bash_array_at_specific_positions\"><\/span>How to add elements to a Bash array at specific positions?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">To add an element to a Bash array at a specific position, use the concept of direct<strong> index assignment<\/strong> with the syntax <strong>array_name[index]=value<\/strong>. For instance, to add an element named <strong>apple<\/strong> at the 5th position (index 4) to the <code class=\"\" data-line=\"\">array food=(rice meat wheat)<\/code>, use the syntax <code class=\"\" data-line=\"\">food[4]=apple<\/code>.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Can_I_append_an_array_to_another_array_in_Bash\"><\/span>Can I append an array to another array in Bash?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\"><strong>Yes<\/strong>, to append an array to another array, use the <code class=\"\" data-line=\"\">&lt;strong&gt;+=&lt;\/strong&gt;<\/code> operator with the syntax <code class=\"\" data-line=\"\">new_array+=(${array[@]})<\/code> to append <strong>array<\/strong> to <strong>new_array<\/strong>. Here\u2019s a script for example:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">#!\/bin\/bash\n\narr1=(&quot;apple&quot; &quot;banana&quot; &quot;cherry&quot;)\narr2=(&quot;mango&quot; &quot;grape&quot;)\narr1+=(${arr2[@]})\n\necho ${arr1[@]}<\/code><\/pre>\n<p><strong>Output<\/strong>: apple banana cherry mango grape<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Whats_the_difference_between_arrayelement_and_arrayelement\"><\/span>What&#8217;s the difference between array+=element and array+=(element)?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">The first syntax <strong>array+=element<\/strong> adds a string <strong>element <\/strong>to the first element while the latter one appends <strong>element <\/strong>as a new individual value at the end of the array. Take the array <code class=\"\" data-line=\"\">num=(1 2 3)<\/code> for example. The syntax <code class=\"\" data-line=\"\">num+=4<\/code> will add <strong>4<\/strong> as a string at the end of the element <strong>1<\/strong>. However, the syntax\u00a0 <code class=\"\" data-line=\"\">num+=(4)<\/code> will add 4 as a new array element to the end of the array. See the below Bash script:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">#!\/bin\/bash\nnum=( 1 2 3)\n\nnum+=4\nnum+=(4)\n\necho ${num[@]}\n<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"How_do_I_append_to_an_array_in_Bash\"><\/span>How do I append to an array in Bash?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">To append to an array in Bash, use the <strong>\u201c+=\u201d<\/strong> operator, with the syntax, <code class=\"\" data-line=\"\">your_array+=(element_To_add)<\/code>. This allows you to add an element to the end of an array.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Is_it_possible_to_append_multiple_arrays_to_another_Bash_array\"><\/span>Is it possible to append multiple arrays to another Bash array?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\"><strong>Yes<\/strong>, to append multiple arrays to another array, use <code class=\"\" data-line=\"\">+=<\/code> with the syntax <code class=\"\" data-line=\"\">array1+=(&quot;${array2[@]}&quot; &quot;${array3[@]}&quot; &quot;${array4[@]}&quot;)<\/code> to append the 3 arrays (array2 array3 array4) to the existing array1.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"What_is_meant_by_Bash_array_append\"><\/span>What is meant by Bash array append?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\"><strong>Bash array append<\/strong> means to add elements to an array in Bash. The append operation adds elements at the end of an existing array. To append an element to a Bash array, use the shorthand operator <strong>+=<\/strong> with the syntax <strong>array_name+=(element to append)<\/strong>. For example, the syntax <code class=\"\" data-line=\"\">cars+=(honda)<\/code> adds the element <strong>honda <\/strong>to the end of the array <strong>cars<\/strong>.<\/p>\n<p><script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"FAQPage\",\n  \"mainEntity\": [{\n    \"@type\": \"Question\",\n    \"name\": \"How to add elements to a Bash array at specific positions?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"To add an element to a Bash array at a specific position, use the concept of direct index assignment with the syntax array_name[index]=value. For instance, to add an element named apple at the 5th position (index 4) to the array food=(rice meat wheat), use the syntax food[4]=apple.\"\n    }\n  },{\n    \"@type\": \"Question\",\n    \"name\": \"How do I append to an array in Bash?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"To append to an array in Bash, use the \u201c+=\u201d operator, with the syntax, your_array+=(element_To_add). This allows you to add an element to the end of an array.\"\n    }\n  },{\n    \"@type\": \"Question\",\n    \"name\": \"Is it possible to append multiple arrays to another Bash array?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"Yes, it is. Use the shorthand operator += with the syntax array1+=(\\\"${array2[@]}\\\" \\\"${array3[@]}\\\" \\\"${array4[@]}\\\") to append the 3 arrays (array2 array3 array4) to the existing array1.\"\n    }\n  },{\n    \"@type\": \"Question\",\n    \"name\": \"What is meant by Bash array append?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"Bash array append means to add elements to an array in Bash. The append operation adds elements at the end of an existing array. To append an element to a Bash array, use the shorthand operator += with the syntax array_name+=(element to append). For example, the syntax cars+=(honda) adds the element honda to the end of the array cars.\"\n    }\n  }]\n}\n<\/script><\/p>\n<p><span style=\"font-size: 18pt; color: #003366;\"><strong>Related Articles<\/strong><\/span><\/p>\n<ul>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/json-to-array\/\" target=\"_blank\" rel=\"noopener\">How to Convert a JSON Array into Bash Array [5 Methods]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-of-strings-with-spaces\/\" target=\"_blank\" rel=\"noopener\">Master Bash Array of Strings with Spaces [Complete Guide]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/convert-string-to-array\/\" target=\"_blank\" rel=\"noopener\">How to Convert String into Array in Bash [8 Methods]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/clear-array\/\" target=\"_blank\" rel=\"noopener\">How to Clear an Array in Bash [6 Methods]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/filter-array\/\" target=\"_blank\" rel=\"noopener\">How to Filter an Array in Bash? [8 Methods]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/copy-array\/\" target=\"_blank\" rel=\"noopener\">How to Copy an Array in Bash [6 Simple Methods]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/reverse-array\/\" target=\"_blank\" rel=\"noopener\">How to Reverse an Array in Bash? [8 Easy Methods]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-slice\/\" target=\"_blank\" rel=\"noopener\">How to Slice an Array in Bash [10 Simple Methods]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/foreach-array\/\" target=\"_blank\" rel=\"noopener\">Iterate Through a Bash Array Using \u201cforeach\u201d Loop [5 Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/empty-array\/\" target=\"_blank\" rel=\"noopener\">How to Check If an Array is Empty in Bash? [5 Methods]<\/a><\/strong><\/li>\n<\/ul>\n<hr \/>\n<p><strong>&lt;&lt; Go Back to <span data-sheets-root=\"1\" data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Array Operations in Bash&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:1074113,&quot;3&quot;:{&quot;1&quot;:0},&quot;9&quot;:1,&quot;10&quot;:1,&quot;11&quot;:4,&quot;12&quot;:0,&quot;16&quot;:12,&quot;17&quot;:1,&quot;23&quot;:1}\" data-sheets-hyperlink=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/\"><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/\" target=\"_blank\" rel=\"noopener\">Array Operations in Bash<\/a><\/span> | <span data-sheets-root=\"1\" data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Bash Array&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:1074113,&quot;3&quot;:{&quot;1&quot;:0},&quot;9&quot;:1,&quot;10&quot;:1,&quot;11&quot;:4,&quot;12&quot;:0,&quot;16&quot;:12,&quot;17&quot;:1,&quot;23&quot;:1}\" data-sheets-hyperlink=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/\"><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/\" target=\"_blank\" rel=\"noopener\">Bash Array<\/a><\/span> | <span data-sheets-root=\"1\" data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Bash Scripting Tutorial&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:1074113,&quot;3&quot;:{&quot;1&quot;:0},&quot;9&quot;:1,&quot;10&quot;:1,&quot;11&quot;:4,&quot;12&quot;:0,&quot;16&quot;:12,&quot;17&quot;:1,&quot;23&quot;:1}\" data-sheets-hyperlink=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/\"><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/\" target=\"_blank\" rel=\"noopener\">Bash Scripting Tutorial<\/a><\/span><\/strong><\/p>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-center kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;center&quot;,&quot;id&quot;:&quot;34119&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;1&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;2&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;Rate this post&quot;,&quot;legend&quot;:&quot;2\\\/5 - (1 vote)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;How to Append to an Array in Bash? [4 Easy Methods]&quot;,&quot;width&quot;:&quot;55.5&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 55.5px;\">\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            2\/5 - (1 vote)    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>You can use the following 4 methods to append to an array in Bash: Using the shorthand operator (+=): array_name+=(&#039;element &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Append to an Array in Bash? [4 Easy Methods]\" class=\"read-more button\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#more-34119\" aria-label=\"Read more about How to Append to an Array in Bash? [4 Easy Methods]\">Read more<\/a><\/p>\n","protected":false},"author":314910,"featured_media":34129,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[102],"tags":[180],"class_list":["post-34119","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bash-scripting","tag-array-operations","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Append to an Array in Bash? [4 Easy Methods] - LinuxSimply<\/title>\n<meta name=\"description\" content=\"In this article, you will learn about 4 simple methods to append to an array in Bash along with mentioning standard syntax and scripts.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Append to an Array in Bash? [4 Easy Methods] - LinuxSimply\" \/>\n<meta property=\"og:description\" content=\"In this article, you will learn about 4 simple methods to append to an array in Bash along with mentioning standard syntax and scripts.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/\" \/>\n<meta property=\"og:site_name\" content=\"LinuxSimply\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prem.masrur\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-15T03:37:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-16T07:57:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/10-flowchart-bash-append-to-array.png\" \/>\n\t<meta property=\"og:image:width\" content=\"400\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Md Masrur Ul Alam\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Md Masrur Ul Alam\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/array\\\/array-operations\\\/array-append\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/array\\\/array-operations\\\/array-append\\\/\"},\"author\":{\"name\":\"Md Masrur Ul Alam\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/person\\\/64033dc86d4cd3b6a549cd0ae9e73423\"},\"headline\":\"How to Append to an Array in Bash? [4 Easy Methods]\",\"datePublished\":\"2024-01-15T03:37:58+00:00\",\"dateModified\":\"2024-04-16T07:57:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/array\\\/array-operations\\\/array-append\\\/\"},\"wordCount\":1772,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/array\\\/array-operations\\\/array-append\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/10-flowchart-bash-append-to-array.png\",\"keywords\":[\"array operations\"],\"articleSection\":[\"Bash Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/array\\\/array-operations\\\/array-append\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/array\\\/array-operations\\\/array-append\\\/\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/array\\\/array-operations\\\/array-append\\\/\",\"name\":\"How to Append to an Array in Bash? [4 Easy Methods] - LinuxSimply\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/array\\\/array-operations\\\/array-append\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/array\\\/array-operations\\\/array-append\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/10-flowchart-bash-append-to-array.png\",\"datePublished\":\"2024-01-15T03:37:58+00:00\",\"dateModified\":\"2024-04-16T07:57:18+00:00\",\"description\":\"In this article, you will learn about 4 simple methods to append to an array in Bash along with mentioning standard syntax and scripts.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/array\\\/array-operations\\\/array-append\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/array\\\/array-operations\\\/array-append\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/array\\\/array-operations\\\/array-append\\\/#primaryimage\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/10-flowchart-bash-append-to-array.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/10-flowchart-bash-append-to-array.png\",\"width\":400,\"height\":400,\"caption\":\"bash array append feature image\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/array\\\/array-operations\\\/array-append\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Bash Scripting Tutorial\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"A Complete Guide to Bash Array\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/array\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Array Operations in Bash\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/array\\\/array-operations\\\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"How to Append to an Array in Bash? [4 Easy Methods]\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#website\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/\",\"name\":\"LinuxSimply\",\"description\":\"All About Linux\",\"publisher\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/linuxsimply.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\",\"name\":\"LinuxSimply\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/LinuxSimply-New-Logo-Without-Icon.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/LinuxSimply-New-Logo-Without-Icon.png\",\"width\":355,\"height\":48,\"caption\":\"LinuxSimply\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/person\\\/64033dc86d4cd3b6a549cd0ae9e73423\",\"name\":\"Md Masrur Ul Alam\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Md-Masrur-Ul-Alam-II-96x96.png\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Md-Masrur-Ul-Alam-II-96x96.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Md-Masrur-Ul-Alam-II-96x96.png\",\"caption\":\"Md Masrur Ul Alam\"},\"description\":\"Assalamu Alaikum, I\u2019m Md Masrur Ul Alam, currently working as a Linux OS Content Developer Executive at SOFTEKO. I completed my Bachelor's degree in Electronics and Communication Engineering (ECE)from Khulna University of Engineering &amp; Technology (KUET). With an inquisitive mind, I have always had a keen eye for Science and Technolgy based research and education. I strongly hope this entity leverages the success of my effort in developing engaging yet seasoned content on Linux and contributing to the wealth of technical knowledge. Read Full Bio\",\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/prem.masrur\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/masrur-alam\\\/\"],\"url\":\"https:\\\/\\\/linuxsimply.com\\\/author\\\/masrur\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Append to an Array in Bash? [4 Easy Methods] - LinuxSimply","description":"In this article, you will learn about 4 simple methods to append to an array in Bash along with mentioning standard syntax and scripts.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/","og_locale":"en_US","og_type":"article","og_title":"How to Append to an Array in Bash? [4 Easy Methods] - LinuxSimply","og_description":"In this article, you will learn about 4 simple methods to append to an array in Bash along with mentioning standard syntax and scripts.","og_url":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/","og_site_name":"LinuxSimply","article_author":"https:\/\/www.facebook.com\/prem.masrur\/","article_published_time":"2024-01-15T03:37:58+00:00","article_modified_time":"2024-04-16T07:57:18+00:00","og_image":[{"width":400,"height":400,"url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/10-flowchart-bash-append-to-array.png","type":"image\/png"}],"author":"Md Masrur Ul Alam","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Md Masrur Ul Alam","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#article","isPartOf":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/"},"author":{"name":"Md Masrur Ul Alam","@id":"https:\/\/linuxsimply.com\/#\/schema\/person\/64033dc86d4cd3b6a549cd0ae9e73423"},"headline":"How to Append to an Array in Bash? [4 Easy Methods]","datePublished":"2024-01-15T03:37:58+00:00","dateModified":"2024-04-16T07:57:18+00:00","mainEntityOfPage":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/"},"wordCount":1772,"commentCount":0,"publisher":{"@id":"https:\/\/linuxsimply.com\/#organization"},"image":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/10-flowchart-bash-append-to-array.png","keywords":["array operations"],"articleSection":["Bash Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/","url":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/","name":"How to Append to an Array in Bash? [4 Easy Methods] - LinuxSimply","isPartOf":{"@id":"https:\/\/linuxsimply.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#primaryimage"},"image":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/10-flowchart-bash-append-to-array.png","datePublished":"2024-01-15T03:37:58+00:00","dateModified":"2024-04-16T07:57:18+00:00","description":"In this article, you will learn about 4 simple methods to append to an array in Bash along with mentioning standard syntax and scripts.","breadcrumb":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#primaryimage","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/10-flowchart-bash-append-to-array.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/01\/10-flowchart-bash-append-to-array.png","width":400,"height":400,"caption":"bash array append feature image"},{"@type":"BreadcrumbList","@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/array-append\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/linuxsimply.com\/"},{"@type":"ListItem","position":2,"name":"Bash Scripting Tutorial","item":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/"},{"@type":"ListItem","position":3,"name":"A Complete Guide to Bash Array","item":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/"},{"@type":"ListItem","position":4,"name":"Array Operations in Bash","item":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/array\/array-operations\/"},{"@type":"ListItem","position":5,"name":"How to Append to an Array in Bash? [4 Easy Methods]"}]},{"@type":"WebSite","@id":"https:\/\/linuxsimply.com\/#website","url":"https:\/\/linuxsimply.com\/","name":"LinuxSimply","description":"All About Linux","publisher":{"@id":"https:\/\/linuxsimply.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/linuxsimply.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/linuxsimply.com\/#organization","name":"LinuxSimply","url":"https:\/\/linuxsimply.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/#\/schema\/logo\/image\/","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/LinuxSimply-New-Logo-Without-Icon.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/LinuxSimply-New-Logo-Without-Icon.png","width":355,"height":48,"caption":"LinuxSimply"},"image":{"@id":"https:\/\/linuxsimply.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/linuxsimply.com\/#\/schema\/person\/64033dc86d4cd3b6a549cd0ae9e73423","name":"Md Masrur Ul Alam","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Md-Masrur-Ul-Alam-II-96x96.png","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Md-Masrur-Ul-Alam-II-96x96.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Md-Masrur-Ul-Alam-II-96x96.png","caption":"Md Masrur Ul Alam"},"description":"Assalamu Alaikum, I\u2019m Md Masrur Ul Alam, currently working as a Linux OS Content Developer Executive at SOFTEKO. I completed my Bachelor's degree in Electronics and Communication Engineering (ECE)from Khulna University of Engineering &amp; Technology (KUET). With an inquisitive mind, I have always had a keen eye for Science and Technolgy based research and education. I strongly hope this entity leverages the success of my effort in developing engaging yet seasoned content on Linux and contributing to the wealth of technical knowledge. Read Full Bio","sameAs":["https:\/\/www.facebook.com\/prem.masrur\/","https:\/\/www.linkedin.com\/in\/masrur-alam\/"],"url":"https:\/\/linuxsimply.com\/author\/masrur\/"}]}},"_links":{"self":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts\/34119","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/users\/314910"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/comments?post=34119"}],"version-history":[{"count":0,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts\/34119\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/media\/34129"}],"wp:attachment":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/media?parent=34119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/categories?post=34119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/tags?post=34119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}