{"id":10654,"date":"2023-11-22T13:09:58","date_gmt":"2023-11-22T13:09:58","guid":{"rendered":"https:\/\/greenwebpage.com\/community\/?p=10654"},"modified":"2023-11-29T09:28:36","modified_gmt":"2023-11-29T09:28:36","slug":"how-to-work-with-bash-variables","status":"publish","type":"post","link":"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/","title":{"rendered":"How to Work With Bash Variables"},"content":{"rendered":"<p>In each operating system, there is an interface that helps to interact with the programs and manage the files in the computer. In Windows, this interface is termed <strong>CLI (Command Line Interface), <\/strong>and in Linux, there are multiple interfaces but the most common is termed <strong>Bash.<\/strong><\/p>\n<p>In this article, the below contents will be discussed in detail:<\/p>\n<ul>\n<li>What is Bash?<\/li>\n<li>Difference between Bash and Shell<\/li>\n<li>What are Bash Variables?<\/li>\n<li>Rules for Bash Variables<\/li>\n<li>Types of Bash Variables<\/li>\n<li>Working With Bash Variables<\/li>\n<li>Working With Special Bash Variables<\/li>\n<li>Conclusion<\/li>\n<\/ul>\n<h2><strong>1. What is Bash?<\/strong><\/h2>\n<p>Bash is basically a Unix shell and is mostly used as a default login shell for Linux apart from other login shells. It is commonly used to test the software, compile the code, and debug the designed code. Moreover, Bash is also used by network engineers to test, configure, and optimize the organizational network.<\/p>\n<h2><strong>2. Difference Between Bash and Shell<\/strong><\/h2>\n<p>The main difference between Shell and Bash is that Shell is a program that is responsible for providing CL I(Command Line Interface). Whereas, Bash is a special Shell type and is specifically used with Unix and Linux.<\/p>\n<h2><strong>3. What are Bash Variables?<\/strong><\/h2>\n<p>Variables represent numeric and string values. The Bash variables are used to store the reference values. These variables use a <strong>$ <\/strong>sign at the start of the variable name such as $myuser.<\/p>\n<h2><strong>4. Rules for Bash Variables<\/strong><\/h2>\n<p>Variables are a part of every programming language. Similarly, the variables in the Bash consist of a number, a character, and a string of characters. There is a need to follow certain rules when working with Bash variables.<\/p>\n<p>These rules are listed below:<\/p>\n<ol>\n<li>To read or print the variable use the <strong>$<\/strong> sign first.<\/li>\n<li>The name of the variable is considered case-sensitive therefore <strong>C<\/strong> and <strong>c<\/strong> are considered entirely different.<\/li>\n<li>The variable can be in Lowercase or Uppercase or even a mixture of both.<\/li>\n<li>Omit the <strong>$<\/strong> sign, when you assign a value for the variable.<\/li>\n<li>There should not be any space before or after an <strong>= <\/strong>sign when assigning a value to the Bash variable like variable1 =va1(This convention is wrong).<\/li>\n<li>The variable can be declared as alphanumeric or with an underscore<strong>(_)<\/strong>.<\/li>\n<\/ol>\n<h2><strong>5. Types of Bash Variables<\/strong><\/h2>\n<p>The bash variables can be divided into two types, the first one is the system-defined variables and the second one is the user-defined variables. Both types are defined below.<\/p>\n<h3><strong>5.1 System-Defined Bash Variables<\/strong><\/h3>\n<p>These variables are also called environment variables and are defined by the system already. These variables are used by the Bash script since these variables are defined by the system.<\/p>\n<p>The system-defined Bash variables are listed below:<\/p>\n<ul>\n<li><strong>SHELL:<\/strong> The name of the SHELL currently used<\/li>\n<\/ul>\n<p><img fetchpriority=\"high\" decoding=\"async\" width=\"975\" height=\"101\" class=\"wp-image-10655\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-1.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-1.png 975w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-1-300x31.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-1-768x80.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-1-155x16.png 155w\" sizes=\"(max-width: 975px) 100vw, 975px\" \/><\/p>\n<ul>\n<li><strong>PWD:<\/strong> Displays the directory which is currently working<\/li>\n<\/ul>\n<p><img decoding=\"async\" width=\"975\" height=\"90\" class=\"wp-image-10656\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-2.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-2.png 975w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-2-300x28.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-2-768x71.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-2-960x90.png 960w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-2-155x14.png 155w\" sizes=\"(max-width: 975px) 100vw, 975px\" \/><\/p>\n<ul>\n<li><strong>LOGNAME: <\/strong>Displays the user who is currently logged in<\/li>\n<\/ul>\n<p><img decoding=\"async\" width=\"975\" height=\"90\" class=\"wp-image-10657\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-3.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-3.png 975w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-3-300x28.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-3-768x71.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-3-960x90.png 960w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-3-155x14.png 155w\" sizes=\"(max-width: 975px) 100vw, 975px\" \/><\/p>\n<ul>\n<li><strong>HOME: <\/strong>Display the user\u2019s home directory<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"89\" class=\"wp-image-10658\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-4.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-4.png 975w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-4-300x27.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-4-768x70.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-4-960x89.png 960w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-4-155x14.png 155w\" sizes=\"(max-width: 975px) 100vw, 975px\" \/><\/p>\n<ul>\n<li><strong>USER: <\/strong>Displays the current user<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"91\" class=\"wp-image-10659\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-5.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-5.png 975w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-5-300x28.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-5-768x72.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-5-960x91.png 960w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-5-155x14.png 155w\" sizes=\"(max-width: 975px) 100vw, 975px\" \/><\/p>\n<ul>\n<li><strong>PATH: <\/strong>Shows the Bash directories to search for the commands<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"95\" class=\"wp-image-10660\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-6.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-6.png 975w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-6-300x29.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-6-768x75.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-6-960x95.png 960w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-6-155x15.png 155w\" sizes=\"(max-width: 975px) 100vw, 975px\" \/><\/p>\n<p>Apart from the variables mentioned earlier, some other system-defined variables are used according to the need.<\/p>\n<h3><strong>5.2 User-Defined Bash Variables<\/strong><\/h3>\n<p>As per the name, these variables are also termed local variables and are defined by the user only. These variables work only on the specified script.<\/p>\n<p>For example, A variable in Bash can be created like myuser=user12. On passing the $echo command the value for <strong>myuser <\/strong>is printed as user12.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"103\" class=\"wp-image-10661\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-7.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-7.png 975w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-7-300x32.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-7-768x81.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10654-7-155x16.png 155w\" sizes=\"(max-width: 975px) 100vw, 975px\" \/><\/p>\n<p><strong>6. Working With Bash Variables<\/strong><\/p>\n<p>The variables in Bash can be defined and used in Shell as well as in Bash script. Now, we will look into the details regarding variables in the Bash script:<\/p>\n<ul>\n<li>In the first step, create a Bash script file of the text editor as per your preference.<\/li>\n<li>Use the variable of your choice such as $SHELL to look for the shell that is currently in use.<\/li>\n<li>In the last step, run the script accordingly.<\/li>\n<li>You can either use the system-defined variables or the user-defined variables as it depends on the requirement.<\/li>\n<\/ul>\n<h2><strong>7. Working With Special Bash Variables<\/strong><\/h2>\n<p>There are certain special Bash variables that are also used which are listed below.<\/p>\n<ul>\n<li><strong>$$<\/strong>: It displays the current shell\u2019s process ID.<\/li>\n<li><strong>$0<\/strong>: It displays the current script\u2019s file name.<\/li>\n<li><strong>$-<\/strong>: It displays the flags that are currently in use by Bash.<\/li>\n<li><strong>$@<\/strong>: It stores the argument in the form of an array.<\/li>\n<li><strong>$<\/strong>!: It displays the ID for the last background job.<\/li>\n<\/ul>\n<p>Apart from the above-mentioned special characters, there are some other special characters also which can be used according to the requirement.<\/p>\n<p>This concludes the working of the Variables in Bash.<\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>The Variables in Bash are implemented as per the requirements. You can either use the system-defined variables or the variables created on your own. In this article, we have elaborated on the details regarding what Bash variables are, and how to work with the Bash variables and special Bash variables.<\/p>\n\n    <div class=\"xs_social_share_widget xs_share_url after_content \t\tmain_content  wslu-style-1 wslu-share-box-shaped wslu-fill-colored wslu-none wslu-share-horizontal wslu-theme-font-no wslu-main_content\">\n\n\t\t\n        <ul>\n\t\t\t        <\/ul>\n    <\/div> \n","protected":false},"excerpt":{"rendered":"<p>In each operating system, there is an interface that helps to interact with the programs and manage the files in the computer. In Windows, this interface is termed CLI (Command Line Interface), and in Linux, there are multiple interfaces but the most common is termed Bash. In this article, the below contents will be discussed [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":10662,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[242,230],"class_list":["post-10654","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-bash","tag-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Work With Bash Variables - Greenwebpage Community<\/title>\n<meta name=\"description\" content=\"In this article, the bash variables will be discussed in detail along with what is bash? what are bash variables? How they work?\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Work With Bash Variables - Greenwebpage Community\" \/>\n<meta property=\"og:description\" content=\"In this article, the bash variables will be discussed in detail along with what is bash? what are bash variables? How they work?\" \/>\n<meta property=\"og:url\" content=\"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/\" \/>\n<meta property=\"og:site_name\" content=\"Greenwebpage Community\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-22T13:09:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-29T09:28:36+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/How-to-work-with-bash-variables.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Karim Buzdar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Karim Buzdar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/\"},\"author\":{\"name\":\"Karim Buzdar\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\"},\"headline\":\"How to Work With Bash Variables\",\"datePublished\":\"2023-11-22T13:09:58+00:00\",\"dateModified\":\"2023-11-29T09:28:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/\"},\"wordCount\":795,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/How-to-work-with-bash-variables.jpg\",\"keywords\":[\"Bash\",\"Linux\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/\",\"name\":\"How to Work With Bash Variables - Greenwebpage Community\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/How-to-work-with-bash-variables.jpg\",\"datePublished\":\"2023-11-22T13:09:58+00:00\",\"dateModified\":\"2023-11-29T09:28:36+00:00\",\"description\":\"In this article, the bash variables will be discussed in detail along with what is bash? what are bash variables? How they work?\",\"breadcrumb\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/#primaryimage\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/How-to-work-with-bash-variables.jpg\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/How-to-work-with-bash-variables.jpg\",\"width\":1020,\"height\":600,\"caption\":\"How-to-work-with-bash-variables\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/greenwebpage.com\/community\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Work With Bash Variables\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"name\":\"Greenwebpage Community\",\"description\":\"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.\",\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/greenwebpage.com\/community\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\",\"name\":\"Greenwebpage Community\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"width\":512,\"height\":512,\"caption\":\"Greenwebpage Community\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\",\"name\":\"Karim Buzdar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"caption\":\"Karim Buzdar\"},\"sameAs\":[\"https:\/\/greenwebpage.com\"],\"url\":\"https:\/\/greenwebpage.com\/community\/author\/karim\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Work With Bash Variables - Greenwebpage Community","description":"In this article, the bash variables will be discussed in detail along with what is bash? what are bash variables? How they work?","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:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/","og_locale":"en_US","og_type":"article","og_title":"How to Work With Bash Variables - Greenwebpage Community","og_description":"In this article, the bash variables will be discussed in detail along with what is bash? what are bash variables? How they work?","og_url":"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/","og_site_name":"Greenwebpage Community","article_published_time":"2023-11-22T13:09:58+00:00","article_modified_time":"2023-11-29T09:28:36+00:00","og_image":[{"width":1020,"height":600,"url":"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/How-to-work-with-bash-variables.jpg","type":"image\/jpeg"}],"author":"Karim Buzdar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Karim Buzdar","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/#article","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/"},"author":{"name":"Karim Buzdar","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8"},"headline":"How to Work With Bash Variables","datePublished":"2023-11-22T13:09:58+00:00","dateModified":"2023-11-29T09:28:36+00:00","mainEntityOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/"},"wordCount":795,"commentCount":0,"publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/How-to-work-with-bash-variables.jpg","keywords":["Bash","Linux"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/","url":"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/","name":"How to Work With Bash Variables - Greenwebpage Community","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/#website"},"primaryImageOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/#primaryimage"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/How-to-work-with-bash-variables.jpg","datePublished":"2023-11-22T13:09:58+00:00","dateModified":"2023-11-29T09:28:36+00:00","description":"In this article, the bash variables will be discussed in detail along with what is bash? what are bash variables? How they work?","breadcrumb":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/#primaryimage","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/How-to-work-with-bash-variables.jpg","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/How-to-work-with-bash-variables.jpg","width":1020,"height":600,"caption":"How-to-work-with-bash-variables"},{"@type":"BreadcrumbList","@id":"https:\/\/greenwebpage.com\/community\/how-to-work-with-bash-variables\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/greenwebpage.com\/community\/"},{"@type":"ListItem","position":2,"name":"How to Work With Bash Variables"}]},{"@type":"WebSite","@id":"https:\/\/greenwebpage.com\/community\/#website","url":"https:\/\/greenwebpage.com\/community\/","name":"Greenwebpage Community","description":"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.","publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/greenwebpage.com\/community\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/greenwebpage.com\/community\/#organization","name":"Greenwebpage Community","url":"https:\/\/greenwebpage.com\/community\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","width":512,"height":512,"caption":"Greenwebpage Community"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8","name":"Karim Buzdar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","caption":"Karim Buzdar"},"sameAs":["https:\/\/greenwebpage.com"],"url":"https:\/\/greenwebpage.com\/community\/author\/karim\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/10654","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/comments?post=10654"}],"version-history":[{"count":1,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/10654\/revisions"}],"predecessor-version":[{"id":10663,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/10654\/revisions\/10663"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media\/10662"}],"wp:attachment":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media?parent=10654"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/categories?post=10654"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/tags?post=10654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}