## page was renamed from BashGuidePrint = Introduction = '''You are invited to make additions or modifications at http://mywiki.wooledge.org/BashGuide so long as you can keep them accurate. Please test any code samples you write.''' All the information here is presented without any warranty or guarantee of accuracy. Use it at your own risk. When in doubt, please consult the man pages or the GNU info pages as the authoritative references. <> <> == About This Guide == A [[http://guide.bash.academy/|new version of this guide]] is currently being drafted. For now, this guide is still the most complete and best reviewed. Any contributions to the new guide are welcome [[https://github.com/lhunath/bash.academy|via GitHub forks]]. This guide aims to aid people interested in learning to work with [[BASH]]. It aspires to teach good practice techniques for using BASH, and writing simple scripts. This guide is targeted at beginning users. It assumes no advanced knowledge -- just the ability to login to a Unix-like system and open a command-line (terminal) interface. It will help if you know how to use a text editor; we will not be covering editors, nor do we endorse any particular editor choice. Familiarity with the fundamental Unix tool set, or with other programming languages or programming concepts, is not required, but those who have such knowledge may understand some of the examples more quickly. If something is unclear to you, you are invited to report this (use http://mywiki.wooledge.org/BashGuideFeedback, or the `#bash` channel on `irc.freenode.org`) so that it may be clarified in this document for future readers. You are invited to contribute to the development of this document by extending it or correcting invalid or incomplete information. The primary maintainer(s) of this document: * -- [[Lhunath]] (primary author) * -- GreyCat == A Definition == <> == Using Bash == <> == Contents == The guide has been divided into sections, which are intended to be read roughly in the order presented. If you skip ahead to a specific section, you might find yourself missing some background information from previous sections. (Links to relevant sections are not always provided when a topic is mentioned.) * [[#CommandsAndArguments|Commands and Arguments]] - Types of commands; argument splitting; writing scripts. * [[#SpecialCharacters|Special Characters]] - Characters special to bash * [[#Parameters|Parameters]] - Variables; special parameters; parameter types; parameter expansion. * [[#Patterns|Patterns]] - Globs; filename matching; extended globs; brace expansion; regular expressions. * [[#TestsAndConditionals|Tests and Conditionals]] - Exit status; {{{&&}}} and {{{||}}}; if, test and {{{[[}}}; while, until and for; case and select. * [[#Arrays|Arrays]] - Arrays; associative arrays. * [[#InputAndOutput|Input and Output]] - Redirection; here documents; here strings; pipes; process substitution. * [[#CompoundCommands|Compound Commands]] - Subshells; command grouping; arithmetic evaluation; functions; aliases. * [[#Sourcing|Sourcing]] - Reading commands from other files. * [[#JobControl|Job Control]] - Working with background jobs. * [[#Practices|Practices]] - Choosing your shell; quoting; readability; debugging. <> = Commands and Arguments = <> <> = Special Characters = <> <> = Parameters = <> <> = Patterns = <> <> = TestsAndConditionals = <> <> = Arrays = <> <> = Input and Output = <> <> = Compound Commands = <> <> = Sourcing = <> <> = Job Control = <> <> = Practices = <>