[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-699571-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-699571-en":130,"doc-similar-699571":191},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","bashguide-about-this-guide-understanding-bash","BashGuide - About This Guide - Understanding Bash","","BashGuide is a practical guide to the Bash shell, covering core concepts and day-to-day scripting skills. It explains how to use Bash effectively, including command structures, arguments, strings, command types (aliases, functions, builtins, keywords, executables), and script organization. The guide also addresses special characters, parameters and variable types, parameter expansion, pattern matching (globs, extended globs, regular expressions, brace expansion), and control flow with tests and conditionals. It further details arrays, input/output, redirection, pipes, compound commands, subshells, arithmetic evaluation, and debugging practices.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/bashguide-about-this-guide-understanding-bash/699571/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/bashguide-about-this-guide-understanding-bash/699571.png","ImageObject",300,407,{"name":42,"@type":43},"Maya Linwood","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-25","2026-11-12",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",7,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What is the purpose of BashGuide?","Question",{"text":63,"@type":64},"BashGuide aims to aid readers in using Bash effectively and writing reliable shell scripts. It presents concepts, command usage, and practical practices for debugging and correctness.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"What topics are covered in the guide’s core sections?",{"text":68,"@type":64},"The guide covers commands and arguments, special characters, parameters and variable expansion, pattern matching, tests and conditionals, arrays, and input/output. It also includes compound commands, sourcing, job control, and dedicated practices like quoting and debugging.",{"name":70,"@type":61,"acceptedAnswer":71},"How does the guide handle correctness and references?",{"text":72,"@type":64},"It provides information without any warranty and advises readers to test code samples they write. For authoritative references, it recommends consulting the man pages or the GNU info pages and the Bash manual.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},699571,1794479404,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,105,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":103,"slug":104},6,50,"technology",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":97,"slug":129},19,"General","general",{"code":4,"msg":82,"data":131},{"doc_id":79,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":102,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":80,"read_time":144,"preview_page_count":145,"preview_urls":146},962084928432,"https://ap-avatar.wpscdn.com/davatar_155a257f0dc6eb9ab79c44ca47cae57d","BashGuide  \nJuly 20, 2026  \n1  \n2  \nContents  \n1 Introduction 7  \n1.1 About This Guide ................................................. 7  \n1.2 A Definition .................................................... 7  \n1.3 Using Bash .................................................... 8  \n1.4 Contents ...................................................... 9  \n2 Commands and Arguments 11  \n2.1 Strings ....................................................... 13  \n2.2 Types of commands ................................................ 14  \n2.2.1 Aliases .................................................. 14  \n2.2.2 Functions ................................................. 14  \n2.2.3 Builtins .................................................. 15  \n2.2.4 Keywords ................................................. 15  \n2.2.5 Executables ................................................ 15  \n2.3 Scripts ....................................................... 16  \n3 Special Characters 19  \n3.1 Deprecated special characters (recognized, but not recommended) ....................... 21  \n4 Parameters 23  \n4.1 Special Parameters and Variables ......................................... 24  \n4.2 Variable Types ................................................... 27  \n4.3 Parameter Expansion ............................................... 28  \n5 Patterns 33  \n5.1 Glob Patterns ................................................... 33  \n5.2 Extended Globs .................................................. 35  \n5.3 Regular Expressions ............................................... 35  \n5.4 Brace Expansion ................................................. 36  \n6 TestsAndConditionals 39  \n6.1 Exit Status ..................................................... 39  \n6.2 Control Operators (&& and ||) .......................................... 40  \n6.3 Grouping Statements ............................................... 41  \n6.4 Conditional Blocks (if, test and [[) ........................................ 42  \n6.5 Conditional Loops (while, until and for) ..................................... 47  \n6.6 Choices (case and select) ............................................. 51  \n3  \n7 Arrays 55  \n7.1 Creating Arrays .................................................. 56  \n7.2 Using Arrays ................................................... 58  \n7.2.1 Expanding Elements ........................................... 58  \n7.2.2 Expanding Indices ............................................ 61  \n7.2.3 Sparse Arrays ............................................... 62  \n7.3 Associative Arrays ................................................ 62  \n8 Input and Output 65  \n8.1 Command-line Arguments ............................................ 65  \n8.2 The Environment ................................................. 66  \n8.3 File Descriptors .................................................. 67  \n8.4 Redirection .................................................... 69  \n8.4.1 File Redirection .............................................. 69  \n8.4.2 File Descriptor Manipulation ....................................... 72  \n8.4.3 Heredocs And Herestrings ........................................ 74  \n8.5 Pipes ........................................................ 76  \n8.6 Miscellaneous Operators ............................................. 78  \n8.6.1 Process Substitution ........................................... 78  \n9 Compound Commands 81  \n9.1 Subshells ..................................................... 81  \n9.2 Command Grouping ............................................... 81  \n9.3 Arithmetic Evaluation ............................................... 83  \n9.4 Functions ..................................................... 84  \n9.5 Aliases ....................................................... 86  \n9.6 Destroying Constructs .............................................. 87  \n10 Sourcing 89  \n11 Job Control 91  \n11.1 Theory .............................................","cbCaisfhPKBakoxw","https://ap.wps.com/l/cbCaisfhPKBakoxw","pdf",468628,106,"English","# Introduction\n## About This Guide\n## A Definition\n## Using Bash\n# Commands and Arguments\n## Strings\n## Types of commands\n## Scripts\n# Special Characters\n# Parameters\n## Special Parameters and Variables\n## Variable Types\n## Parameter Expansion\n# Patterns\n## Glob Patterns\n## Extended Globs\n## Regular Expressions\n## Brace Expansion\n# Tests and Conditionals\n## Exit Status\n## Control Operators (&& and ||)\n## Conditional Blocks (if, test and [[)\n## Conditional Loops (while, until and for)\n## Choices (case and select)\n# Arrays\n## Creating Arrays\n## Using Arrays\n## Associative Arrays\n# Input and Output\n## Command-line Arguments\n## The Environment\n## File Descriptors\n## Redirection\n## Pipes\n# Compound Commands\n## Subshells\n## Command Grouping\n## Arithmetic Evaluation\n## Functions\n## Aliases\n# Sourcing\n# Job Control\n## Theory\n## Practice\n## Job Specifications\n# Practices\n## Choose Your Shell\n## Quoting\n## Readability\n## Bash Tests\n## Don’t Ever Do These\n## Debugging","[{\"question\":\"What is the purpose of BashGuide?\",\"answer\":\"BashGuide aims to aid readers in using Bash effectively and writing reliable shell scripts. It presents concepts, command usage, and practical practices for debugging and correctness.\"},{\"question\":\"What topics are covered in the guide’s core sections?\",\"answer\":\"The guide covers commands and arguments, special characters, parameters and variable expansion, pattern matching, tests and conditionals, arrays, and input/output. It also includes compound commands, sourcing, job control, and dedicated practices like quoting and debugging.\"},{\"question\":\"How does the guide handle correctness and references?\",\"answer\":\"It provides information without any warranty and advises readers to test code samples they write. For authoritative references, it recommends consulting the man pages or the GNU info pages and the Bash manual.\"}]","BashGuide - About This Guide - Understanding Bash | PDF",267,11,[147,151,155,159,163,167,171,175,179,183,187],{"page_no":22,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/20b3f71416ebe350c42a3ec6b7c9e5d6.webp",983,1272,{"page_no":26,"url":152,"width":153,"height":154},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/1f30d6f2db73f3fc403e9f78311fefea.webp",982,1270,{"page_no":30,"url":156,"width":157,"height":158},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/a76366813cedb011073c2f36260f78f5.webp",981,1269,{"page_no":33,"url":160,"width":161,"height":162},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/e9f355dc41f02cd0b1bf2bc1f4b82c53.webp",980,1268,{"page_no":97,"url":164,"width":165,"height":166},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/b72ee91ef76d38c071493638e686b80a.webp",979,1267,{"page_no":102,"url":168,"width":169,"height":170},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/47b9a0bc3fcdf2f23a5b76ca7b70719d.webp",978,1265,{"page_no":55,"url":172,"width":173,"height":174},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/c039652aba58c363ecee6a0b7029949f.webp",977,1264,{"page_no":110,"url":176,"width":177,"height":178},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/a979a94ac54b719c5a2c0db68763a039.webp",976,1263,{"page_no":115,"url":180,"width":181,"height":182},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/44f6db32dcd03d47674f2a4406288ead.webp",975,1261,{"page_no":123,"url":184,"width":185,"height":186},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/8a0a75a5a4fb6b272b5dea00db951a6d.webp",974,1260,{"page_no":145,"url":188,"width":189,"height":190},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/4cbb1cf64032a57b7c68bfe05fed3c13.webp",973,1259,{"list":192,"token":11},[193,199,205,212,219,226,233,239,245,251],{"doc_id":194,"doc_title":195,"file_type":137,"home_preview_img_url":196,"slug":197,"view_count":33,"category_name":29,"create_tm":198},699572,"An Introduction to the Linux Command Shell - For Beginners - A GNU Free Documentation License Manual","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011312375/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=Skt4k%2Fu12oE3E3ApNveyzfhoXq0%3D","an-introduction-to-the-linux-command-shell-for-beginners-a-gnu-free-documentation-license-manual",1794479414,{"doc_id":200,"doc_title":201,"file_type":137,"home_preview_img_url":202,"slug":203,"view_count":33,"category_name":29,"create_tm":204},687676,"Linux Aliases and Hidden Files - How to Use Them","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001263267/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=PAyBKs8c8pFBszcINBQ2bNvYm8c%3D","linux-aliases-and-hidden-files-how-to-use-them",1794084498,{"doc_id":206,"doc_title":207,"file_type":137,"home_preview_img_url":208,"slug":209,"view_count":210,"category_name":29,"create_tm":211},22608,"The Ubuntu Issue: Expert Tips for Coding","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229715746384/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=bT6%2F6xMUsNcmdCOPy6m1AG2YAn4%3D","the-ubuntu-issue-expert-tips-for-coding",62,1777611058,{"doc_id":213,"doc_title":214,"file_type":137,"home_preview_img_url":215,"slug":216,"view_count":217,"category_name":29,"create_tm":218},116713,"BEST of BASH - 2026 Edition - Unsung Command-Line Tools","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229834364500/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=t5Y99ZUaDAjwfJyL09LZPvBsa08%3D","best-of-bash-2026-edition-unsung-command-line-tools",41,1785663519,{"doc_id":220,"doc_title":221,"file_type":137,"home_preview_img_url":222,"slug":223,"view_count":224,"category_name":29,"create_tm":225},117655,"Best of Bash 2026 Edition - Unsung Tools for the Shell - Going Deeper","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229834701874/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=c6uItJn2O3mk8zsIXslQJZmN%2BD0%3D","best-of-bash-2026-edition-unsung-tools-for-the-shell-going-deeper",38,1785678010,{"doc_id":227,"doc_title":228,"file_type":137,"home_preview_img_url":229,"slug":230,"view_count":231,"category_name":29,"create_tm":232},671807,"A Practical Guide to Linux Commands - Editors and Shell Programming - Third Edition","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229988776589/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=%2BnBpi1g8IFiuxdbtFhxGcXLhfvY%3D","a-practical-guide-to-linux-commands-editors-and-shell-programming-third-edition",13,1793580874,{"doc_id":234,"doc_title":235,"file_type":137,"home_preview_img_url":236,"slug":237,"view_count":30,"category_name":29,"create_tm":238},687515,"Identify for Microchip Debugging Environment for Microchip Reference Manual - read online free","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001261948/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=O8xTNEVM%2FeavLxrRYuixh6WOfEo%3D","identify-for-microchip-debugging-environment-for-microchip-reference-manual-read-online-free",1794083970,{"doc_id":240,"doc_title":241,"file_type":137,"home_preview_img_url":242,"slug":243,"view_count":102,"category_name":29,"create_tm":244},699566,"CS2043-Unix Tools & Scripting - lecture 04","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011312335/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=dJ8JUzs9DeRUbMYbwJUSifD%2F%2B6g%3D","cs2043-unix-tools-scripting-lecture-04",1794479393,{"doc_id":246,"doc_title":247,"file_type":137,"home_preview_img_url":248,"slug":249,"view_count":97,"category_name":29,"create_tm":250},670924,"CAP - Community Analysis Pipeline - Tutorial","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229988353372/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=vO0pnaSkzVdT87EGq5Q5wjLz5Vo%3D","cap-community-analysis-pipeline-tutorial",1793572722,{"doc_id":252,"doc_title":253,"file_type":137,"home_preview_img_url":254,"slug":255,"view_count":97,"category_name":29,"create_tm":256},689100,"Principia Softwarica: The Plan 9 Shell rc - version 1.0 - technical documentation","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000680124/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=GDET05ET7DB%2F9TDi21mNC1Osyg0%3D","principia-softwarica-the-plan-9-shell-rc-version-10-technical-documentation",1794096301]