<Comment>#! /bin/sh</Comment><br/>
<Comment># This is a test script for the Katepart Bash Syntax Highlighting by</Comment><br/>
<Comment>#	Wilbert Berendsen.  This is not runnable !!!</Comment><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># The highlighting recognizes basic types of input, and has a few special cases that</Comment><br/>
<Comment># are all in FindCommands.  The main objective is to create really proper nesting of</Comment><br/>
<Comment># (multiline) strings, variables, expressions, etc.</Comment><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># ============== Tests: ===============</Comment><br/>
<Normal Text></Normal Text><br/>
<Comment># basic types:</Comment><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><String SingleQ>'single quoted string'</String SingleQ><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><String DoubleQ>"double quoted string"</String DoubleQ><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><String SingleQ>$'string with esc</String SingleQ><String Escape>\a</String Escape><String SingleQ>pes</String SingleQ><String Escape>\x0d</String Escape><String SingleQ>in it'</String SingleQ><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><String Transl.>$"</String Transl.><String DoubleQ>string meant to be translated"</String DoubleQ><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><String DoubleQ>"$"</String DoubleQ><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># comments:</Comment><br/>
<Comment># this is a comment</Comment><br/>
<Comment>#this too</Comment><br/>
<Builtin>echo</Builtin><Normal Text> this is#nt a comment</Normal Text><br/>
<Command>dcop</Command><Normal Text> kate EditInterface#1 </Normal Text><Comment>#this is</Comment><br/>
<Command>grep</Command><Normal Text> </Normal Text><Option>-e</Option><Normal Text> </Normal Text><String DoubleQ>"^default/linux/amd64/"</String DoubleQ><Normal Text> </Normal Text><Control>|</Control><OtherCommand>\ #this</OtherCommand><Normal Text> is not a comment but </Normal Text><Comment>#this is</Comment><br/>
<Command>mkdir</Command><Normal Text> this</Normal Text><Escape>\ </Escape><Normal Text>isnt</Normal Text><Escape>\ </Escape><Normal Text>#a</Normal Text><Escape>\ </Escape><Normal Text>comment</Normal Text><br/>
<Command>mkdir</Command><Normal Text> this</Normal Text><Escape>\ </Escape><Normal Text>isnt</Normal Text><Escape>\\\;</Escape><Normal Text>#a</Normal Text><Escape>\ </Escape><Normal Text>comment</Normal Text><br/>
<Command>mkdir</Command><Normal Text> this</Normal Text><Escape>\\</Escape><Normal Text> </Normal Text><Comment>#is a comment</Comment><br/>
<Normal Text></Normal Text><br/>
<Comment># brace expansion</Comment><br/>
<Command>mv</Command><Normal Text> my_file.</Normal Text><Escape>{JPG</Escape><Operator>,</Operator><Escape>jpg}</Escape><br/>
<Builtin>echo</Builtin><Normal Text> f.</Normal Text><Escape>{</Escape><Decimal>01</Decimal><Escape>..</Escape><Decimal>100</Decimal><Escape>..</Escape><Decimal>3</Decimal><Escape>}</Escape><Normal Text> f.</Normal Text><Escape>{</Escape><Normal Text>Z</Normal Text><Escape>..</Escape><Normal Text>a</Normal Text><Escape>..</Escape><Decimal>-3</Decimal><Escape>}</Escape><br/>
<Builtin>echo</Builtin><Normal Text> f.</Normal Text><Escape>{</Escape><Decimal>01</Decimal><Escape>..</Escape><Decimal>100</Decimal><Escape>}</Escape><Normal Text> f.</Normal Text><Escape>{</Escape><Normal Text>a</Normal Text><Escape>..</Escape><Normal Text>Z</Normal Text><Escape>}</Escape><br/>
<Comment># no brace expansion</Comment><br/>
<Builtin>echo</Builtin><Normal Text> f.{..100} f.{1..Z} f.{a..Z..}</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># special characters are escaped:</Comment><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><Escape>\(</Escape><Normal Text>output</Normal Text><Escape>\)</Escape><Normal Text> </Normal Text><Escape>\&\|</Escape><Normal Text> </Normal Text><Escape>\></Escape><Normal Text> </Normal Text><Escape>\<</Escape><Normal Text> </Normal Text><Escape>\"</Escape><Normal Text> </Normal Text><Escape>\'</Escape><Normal Text> </Normal Text><Escape>\*</Escape><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># variable substitution:</Comment><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$filename</Variable><Normal Text>.ext</Normal Text><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$filename_ext</Variable><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>filename</Variable><Parameter Expansion>}</Parameter Expansion><Normal Text>_ext</Normal Text><br/>
<Builtin>echo</Builtin><Normal Text> text</Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>array</Variable><Parameter Expansion Operator>[</Parameter Expansion Operator><Variable>$subscript</Variable><Parameter Expansion Operator>]</Parameter Expansion Operator><Parameter Expansion>}</Parameter Expansion><Normal Text>.text</Normal Text><br/>
<Builtin>echo</Builtin><Normal Text> text</Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>array</Variable><Parameter Expansion Operator>[</Parameter Expansion Operator><String DoubleQ>"string"</String DoubleQ><Parameter Expansion Operator>]</Parameter Expansion Operator><Parameter Expansion>}</Parameter Expansion><Normal Text>.text</Normal Text><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Parameter Expansion Operator>!</Parameter Expansion Operator><Variable>prefix</Variable><Parameter Expansion Operator>*</Parameter Expansion Operator><Parameter Expansion>}</Parameter Expansion><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Parameter Expansion Operator>!</Parameter Expansion Operator><Variable>redir</Variable><Parameter Expansion>}</Parameter Expansion><br/>
<Builtin>echo</Builtin><Normal Text> short are </Normal Text><Variable>$_</Variable><Normal Text>, </Normal Text><Variable>$$</Variable><Normal Text>, </Normal Text><Variable>$?</Variable><Normal Text>, </Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>@</Variable><Parameter Expansion>}</Parameter Expansion><Normal Text>, etc.</Normal Text><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>variable</Variable><Parameter Expansion Operator>/</Parameter Expansion Operator><Pattern>a</Pattern><Parameter Expansion Operator>/</Parameter Expansion Operator><Normal Text>d</Normal Text><Parameter Expansion>}</Parameter Expansion><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>1</Variable><Parameter Expansion Operator>:-</Parameter Expansion Operator><Normal Text>default</Normal Text><Parameter Expansion>}</Parameter Expansion><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>10</Variable><Parameter Expansion>}</Parameter Expansion><Normal Text> </Normal Text><Variable>$1</Variable><Normal Text>0a </Normal Text><Comment># 9 is max</Comment><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># expression subst:</Comment><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><Parameter Expansion>$((</Parameter Expansion><Normal Text> </Normal Text><Variable>cd</Variable><Normal Text> </Normal Text><Operator><<</Operator><Normal Text> </Normal Text><Variable>ed</Variable><Normal Text> </Normal Text><Operator>+</Operator><Normal Text> </Normal Text><Decimal>1</Decimal><Normal Text> </Normal Text><Variable>))</Variable><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># command subst:</Comment><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><Parameter Expansion>$(</Parameter Expansion><Command>ls</Command><Normal Text> </Normal Text><Option>-l</Option><Parameter Expansion>)</Parameter Expansion><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><Backquote>`</Backquote><Command>cat</Command><Normal Text> myfile</Normal Text><Backquote>`</Backquote><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># file subst:</Comment><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><Parameter Expansion>$(</Parameter Expansion><Redirection><</Redirection><Variable>$filename</Variable><Parameter Expansion>)</Parameter Expansion><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><Parameter Expansion>$(</Parameter Expansion><Redirection><</Redirection><Path>/path/to/myfile</Path><Parameter Expansion>)</Parameter Expansion><br/>
<Normal Text></Normal Text><br/>
<Comment># process subst:</Comment><br/>
<Command>sort</Command><Normal Text> </Normal Text><Redirection><(</Redirection><OtherCommand>show_labels</OtherCommand><Redirection>)</Redirection><Normal Text> </Normal Text><Control>|</Control><Normal Text> </Normal Text><Command>sed</Command><Normal Text> </Normal Text><String SingleQ>'s/a/bg'</String SingleQ><Normal Text> </Normal Text><Redirection>></Redirection><Normal Text> </Normal Text><Path>my_file.txt</Path><Normal Text> </Normal Text><File Descriptor>2</File Descriptor><Redirection>>&</Redirection><File Descriptor>1</File Descriptor><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># All substitutions also work in strings:</Comment><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><String DoubleQ>"subst </String DoubleQ><Parameter Expansion>${</Parameter Expansion><Variable>in</Variable><Parameter Expansion>}</Parameter Expansion><String DoubleQ>side string"</String DoubleQ><Normal Text>  </Normal Text><String SingleQ>'not $inside this ofcourse'</String SingleQ><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><String DoubleQ>"The result is </String DoubleQ><Parameter Expansion>$((</Parameter Expansion><Normal Text> </Normal Text><Variable>$a</Variable><Normal Text> </Normal Text><Operator>+</Operator><Normal Text> </Normal Text><Variable>$b</Variable><Normal Text> </Normal Text><Variable>))</Variable><String DoubleQ>. Thanks!"</String DoubleQ><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><String DoubleQ>"Your homedir contains </String DoubleQ><Backquote>`</Backquote><Command>ls</Command><Normal Text> </Normal Text><Variable>$HOME</Variable><Normal Text> </Normal Text><Control>|</Control><Command>wc</Command><Normal Text> </Normal Text><Option>-l</Option><Backquote>`</Backquote><String DoubleQ> files."</String DoubleQ><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># Escapes in strings:</Comment><br/>
<Variable>p</Variable><Operator>=</Operator><String DoubleQ>"String </String DoubleQ><String Escape>\`</String Escape><String DoubleQ> with </String DoubleQ><String Escape>\$</String Escape><String DoubleQ> escapes </String DoubleQ><String Escape>\"</String Escape><String DoubleQ> "</String DoubleQ><Control>;</Control><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># keywords are black, builtins dark purple and common commands lighter purple</Comment><br/>
<Builtin>set</Builtin><br/>
<Builtin>exit</Builtin><br/>
<Command>login</Command><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># Other colorings:</Comment><br/>
<Function>error()</Function><Normal Text> </Normal Text><Keyword>{</Keyword><br/>
<Normal Text>	</Normal Text><Command>cat</Command><Normal Text> </Normal Text><Path>/usr/bin/lesspipe.sh</Path><br/>
<Normal Text>	</Normal Text><OtherCommand>runscript</OtherCommand><Normal Text> </Normal Text><Redirection>>&</Redirection><Normal Text> </Normal Text><Path>redir.bak</Path><br/>
<Normal Text>	</Normal Text><Builtin>exec</Builtin><Normal Text> </Normal Text><File Descriptor>3</File Descriptor><Redirection>>&</Redirection><File Descriptor>4</File Descriptor><br/>
<Keyword>}</Keyword><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># do - done make code blocks</Comment><br/>
<Control Flow>while</Control Flow><Normal Text> </Normal Text><Builtin>[</Builtin><Normal Text> </Normal Text><Variable>$p</Variable><Normal Text> </Normal Text><Expression>-lt</Expression><Normal Text> </Normal Text><Variable>$q</Variable><Normal Text> </Normal Text><Builtin>]</Builtin><br/>
<Control Flow>do</Control Flow><br/>
<Normal Text>	</Normal Text><Command>chown</Command><Normal Text> 0644 </Normal Text><Variable>$file</Variable><Normal Text>.</Normal Text><Variable>$p</Variable><br/>
<Control Flow>done</Control Flow><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># braces as well</Comment><br/>
<OtherCommand>run_prog</OtherCommand><Normal Text> </Normal Text><Control>|</Control><Normal Text> </Normal Text><Command>sort</Command><Normal Text> </Normal Text><Option>-u</Option><Normal Text> </Normal Text><Control>|</Control><br/>
<Keyword>{</Keyword><br/>
<Normal Text>	</Normal Text><Builtin>echo</Builtin><Normal Text> Header</Normal Text><br/>
<Normal Text>	</Normal Text><Control Flow>while</Control Flow><Normal Text> </Normal Text><Builtin>read</Builtin><Normal Text> </Normal Text><Variable>a</Variable><Normal Text> </Normal Text><Variable>b</Variable><Normal Text> </Normal Text><Variable>d</Variable><br/>
<Normal Text>	</Normal Text><Control Flow>do</Control Flow><br/>
<Normal Text>		</Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$a</Variable><Path>/</Path><Variable>$b</Variable><Path>/</Path><Variable>$c</Variable><br/>
<Normal Text>	</Normal Text><Control Flow>done</Control Flow><br/>
<Normal Text>	</Normal Text><Builtin>echo</Builtin><Normal Text> Footer</Normal Text><br/>
<Keyword>}</Keyword><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># Any constructions can be nested:</Comment><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><String DoubleQ>"A long string with </String DoubleQ><Parameter Expansion>$(</Parameter Expansion><br/>
<Normal Text>	</Normal Text><Control Flow>if</Control Flow><Normal Text> </Normal Text><Builtin>[</Builtin><Normal Text> </Normal Text><Variable>$count</Variable><Normal Text> </Normal Text><Expression>-gt</Expression><Normal Text> 100 </Normal Text><Builtin>]</Builtin><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>then</Control Flow><br/>
<Normal Text>		</Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><String DoubleQ>"much"</String DoubleQ><br/>
<Normal Text>	</Normal Text><Control Flow>else</Control Flow><br/>
<Normal Text>		</Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><String DoubleQ>"not much"</String DoubleQ><br/>
<Normal Text>	</Normal Text><Control Flow>fi</Control Flow><Normal Text> </Normal Text><Parameter Expansion>)</Parameter Expansion><String DoubleQ> substitutions."</String DoubleQ><Normal Text> </Normal Text><Control>;</Control><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># Even the case construct is correctly folded:</Comment><br/>
<Builtin>test</Builtin><Normal Text> </Normal Text><Option>-f</Option><Normal Text> blaat </Normal Text><Control>&&</Control><br/>
<Keyword>(</Keyword><Normal Text>	</Normal Text><OtherCommand>do_something</OtherCommand><br/>
<Normal Text>	</Normal Text><Control Flow>case</Control Flow><Normal Text> </Normal Text><Variable>$p</Variable><Normal Text> </Normal Text><Keyword>in</Keyword><br/>
<Normal Text>		</Normal Text><Glob>*</Glob><Pattern>bak</Pattern><Keyword>)</Keyword><br/>
<Normal Text>			</Normal Text><OtherCommand>do_bak</OtherCommand><Normal Text> </Normal Text><Variable>$p</Variable><br/>
<Normal Text>			</Normal Text><Control Flow>;;</Control Flow><br/>
<Normal Text>		</Normal Text><Glob>*</Glob><Keyword>)</Keyword><br/>
<Normal Text>			</Normal Text><OtherCommand>dont_bak</OtherCommand><Normal Text> </Normal Text><Variable>$p</Variable><br/>
<Normal Text>			</Normal Text><Control Flow>;;</Control Flow><br/>
<Normal Text>	</Normal Text><Control Flow>esac</Control Flow><br/>
<Keyword>)</Keyword><Normal Text> </Normal Text><Comment># despite the extra parentheses in the case construction.</Comment><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># more control flow</Comment><br/>
<Control Flow>while</Control Flow><Normal Text> </Normal Text><Builtin>:</Builtin><Control>;</Control><br/>
<Normal Text>  </Normal Text><Control Flow>break</Control Flow><br/>
<Normal Text>  </Normal Text><Control Flow>continue</Control Flow><br/>
<Normal Text>  </Normal Text><Control Flow>return</Control Flow><br/>
<Control Flow>done</Control Flow><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># variable assignments:</Comment><br/>
<Variable>DIR</Variable><Operator>=</Operator><Path>/dev</Path><br/>
<Variable>p</Variable><Operator>=</Operator><Backquote>`</Backquote><Command>ls</Command><Backquote>`</Backquote><br/>
<Variable>LC_ALL</Variable><Operator>=</Operator><String DoubleQ>"nl"</String DoubleQ><Normal Text> </Normal Text><Command>dcop</Command><Normal Text> </Normal Text><String SingleQ>'kate*'</String SingleQ><br/>
<Variable>_VAR</Variable><Operator>=</Operator><Normal Text>val</Normal Text><br/>
<Variable>ARR</Variable><Operator>=</Operator><Variable>(</Variable><Normal Text>this is an array</Normal Text><Variable>)</Variable><br/>
<Variable>ARR2</Variable><Operator>=</Operator><Variable>(</Variable><Parameter Expansion Operator>[</Parameter Expansion Operator><Normal Text>this</Normal Text><Parameter Expansion Operator>]</Parameter Expansion Operator><Variable>=</Variable><Normal Text>too </Normal Text><Parameter Expansion Operator>[</Parameter Expansion Operator><Normal Text>and</Normal Text><Parameter Expansion Operator>]</Parameter Expansion Operator><Variable>=</Variable><String DoubleQ>"this too"</String DoubleQ><Variable>)</Variable><br/>
<Variable>usage</Variable><Operator>=</Operator><String DoubleQ>"</String DoubleQ><Variable>$0</Variable><String DoubleQ> -- version </String DoubleQ><Variable>$VERSION</Variable><br/>
<String DoubleQ>Multiple lines of output</String DoubleQ><br/>
<String DoubleQ>can be possible."</String DoubleQ><br/>
<Variable>ANSWER</Variable><Operator>=</Operator><Normal Text>yes	</Normal Text><Comment># here 'yes' isn't highlighed as command</Comment><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># Some commands expect variable names, these are colored correctly:</Comment><br/>
<Builtin>export</Builtin><Normal Text> </Normal Text><Variable>PATH</Variable><Operator>=</Operator><Path>/my/bin:</Path><Variable>$PATH</Variable><Normal Text> </Normal Text><Variable>BLAAT</Variable><br/>
<Builtin>export</Builtin><Normal Text> </Normal Text><Variable>A</Variable><Normal Text> </Normal Text><Variable>B</Variable><Normal Text> </Normal Text><Variable>D</Variable><br/>
<Builtin>local</Builtin><Normal Text> </Normal Text><Variable>p</Variable><Operator>=</Operator><Normal Text>3  </Normal Text><Variable>x</Variable><Normal Text>  </Normal Text><Variable>y</Variable><Operator>=</Operator><String SingleQ>'\'</String SingleQ><br/>
<Builtin>read</Builtin><Normal Text> </Normal Text><Variable>x</Variable><Normal Text> </Normal Text><Variable>y</Variable><Normal Text> </Normal Text><Variable>z</Variable><Normal Text> </Normal Text><Redirection><<<</Redirection><Normal Text> </Normal Text><Variable>$hallo</Variable><br/>
<Builtin>unset</Builtin><Normal Text> </Normal Text><Variable>B</Variable><br/>
<Builtin>declare</Builtin><Normal Text> </Normal Text><Option>-a</Option><Normal Text> </Normal Text><Variable>VAR1</Variable><Normal Text> </Normal Text><Variable>VAR2</Variable><Normal Text> </Normal Text><Control>&&</Control><Normal Text> </Normal Text><Builtin>exit</Builtin><br/>
<Builtin>declare</Builtin><Normal Text> </Normal Text><Variable>less</Variable><Normal Text> </Normal Text><Variable>a</Variable><Normal Text> </Normal Text><Control>&&</Control><Normal Text> </Normal Text><OtherCommand>b</OtherCommand><br/>
<Builtin>declare</Builtin><Normal Text> </Normal Text><Variable>a</Variable><Operator>=</Operator><Variable>(</Variable><Normal Text>1 2</Normal Text><Variable>)</Variable><br/>
<Builtin>getopts</Builtin><Normal Text> </Normal Text><Operator>:</Operator><Normal Text>h</Normal Text><Operator>:</Operator><Normal Text>l</Normal Text><Operator>::</Operator><Normal Text>d </Normal Text><Variable>arg</Variable><br/>
<Builtin>read</Builtin><Normal Text> </Normal Text><Comment>#comment</Comment><br/>
<Builtin>let</Builtin><Normal Text> </Normal Text><Variable>a</Variable><Operator>=</Operator><Decimal>4</Decimal><Operator>+</Operator><Decimal>4</Decimal><Normal Text> </Normal Text><Decimal>3</Decimal><Operator>+</Operator><Variable>a</Variable><Normal Text> </Normal Text><Variable>b</Variable><Operator>=</Operator><Variable>c</Variable><Operator>+</Operator><Decimal>3</Decimal><Normal Text> </Normal Text><Variable>d</Variable><Operator>+</Operator><Decimal>3</Decimal><Normal Text> </Normal Text><Variable>d</Variable><Glob>*</Glob><Path>4</Path><Normal Text> </Normal Text><Comment># * is a glob</Comment><br/>
<Normal Text></Normal Text><br/>
<Comment># options are recoqnized:</Comment><br/>
<Command>zip</Command><Normal Text> </Normal Text><Option>-f</Option><Operator>=</Operator><Normal Text>file.zip</Normal Text><br/>
<OtherCommand>./configure</OtherCommand><Normal Text>  </Normal Text><Option>--destdir</Option><Operator>=</Operator><Path>/usr</Path><br/>
<Command>make</Command><Normal Text>  </Normal Text><Path>destdir=/usr/</Path><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># [[ and [ correctly need spaces to be regarded as structure,</Comment><br/>
<Comment># otherwise they are patterns (currently treated as normal text)</Comment><br/>
<Control Flow>if</Control Flow><Normal Text> </Normal Text><Builtin>[</Builtin><Normal Text> </Normal Text><String DoubleQ>"</String DoubleQ><Variable>$p</Variable><String DoubleQ>"</String DoubleQ><Normal Text> </Normal Text><Expression>==</Expression><Normal Text> </Normal Text><String DoubleQ>""</String DoubleQ><Normal Text> </Normal Text><Builtin>]</Builtin><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>then</Control Flow><br/>
<Normal Text>	</Normal Text><Command>ls</Command><Normal Text> </Normal Text><Path>/usr/bin/[a-z]</Path><Glob>*</Glob><br/>
<Control Flow>elif</Control Flow><Normal Text> </Normal Text><Keyword>[[</Keyword><Normal Text> </Normal Text><Variable>$p</Variable><Normal Text> </Normal Text><Expression>==</Expression><Normal Text> 0 </Normal Text><Keyword>]]</Keyword><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>then</Control Flow><br/>
<Normal Text>	</Normal Text><Command>ls</Command><Normal Text> </Normal Text><Path>/usr/share/</Path><Variable>$p</Variable><br/>
<Control Flow>fi</Control Flow><br/>
<Normal Text></Normal Text><br/>
<Comment># Fixed:</Comment><br/>
<Command>ls</Command><Normal Text> </Normal Text><Path>a[ab]</Path><Glob>*</Glob><Normal Text>		</Normal Text><Comment># dont try to interprete as assignment with subscript (fixed)</Comment><br/>
<Variable>a</Variable><Parameter Expansion Operator>[</Parameter Expansion Operator><Normal Text>ab</Normal Text><Parameter Expansion Operator>]</Parameter Expansion Operator><br/>
<Variable>a</Variable><Parameter Expansion Operator>[</Parameter Expansion Operator><Normal Text>ab</Normal Text><Parameter Expansion Operator>]</Parameter Expansion Operator><Operator>=</Operator><Normal Text>sa</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># Here documents are difficult to catch:</Comment><br/>
<Command>cat</Command><Normal Text> </Normal Text><Redirection>></Redirection><Normal Text> </Normal Text><Path>myfile</Path><Normal Text> </Normal Text><Redirection><< __EOF__</Redirection><br/>
<Here Doc>You're right, this is definitely no bash code</Here Doc><br/>
<Here Doc>But ls more </Here Doc><Variable>$parameters</Variable><Here Doc> should be expanded.</Here Doc><br/>
<Redirection>__EOF__</Redirection><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># quoted:</Comment><br/>
<Command>cat</Command><Normal Text> </Normal Text><Redirection><< "EOF"</Redirection><Normal Text> </Normal Text><Control>|</Control><Normal Text> </Normal Text><Command>egrep</Command><Normal Text> </Normal Text><String DoubleQ>"this"</String DoubleQ><Normal Text> </Normal Text><Redirection>>&</Redirection><File Descriptor>4</File Descriptor><Normal Text>   </Normal Text><Comment># the rest of the line is still considered bash source</Comment><br/>
<Here Doc>You're right, this is definitely no bash code</Here Doc><br/>
<Here Doc>But ls more $parameters should be expanded. :-></Here Doc><br/>
<Redirection>EOF</Redirection><br/>
<Normal Text></Normal Text><br/>
<Command>cat</Command><Normal Text> </Normal Text><Redirection><<bla</Redirection><Normal Text> </Normal Text><Control>||</Control><Normal Text> </Normal Text><Builtin>exit</Builtin><br/>
<Here Doc>bla bla</Here Doc><br/>
<Redirection>bla</Redirection><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># indented:</Comment><br/>
<Control Flow>if</Control Flow><Normal Text> </Normal Text><Command>true</Command><br/>
<Control Flow>then</Control Flow><br/>
<Normal Text>	</Normal Text><Command>cat</Command><Normal Text> </Normal Text><Redirection><<- EOF</Redirection><br/>
<Here Doc>		Indented text with a </Here Doc><Variable>$dollar</Variable><Here Doc> or </Here Doc><Escape>\$</Escape><Here Doc>two</Here Doc><br/>
<Redirection>	EOF</Redirection><br/>
<Control Flow>elif</Control Flow><Normal Text> </Normal Text><Builtin>[</Builtin><Normal Text> </Normal Text><Expression>-d</Expression><Normal Text> </Normal Text><Variable>$file</Variable><Normal Text> </Normal Text><Builtin>]</Builtin><Control>;</Control><Normal Text> </Normal Text><Control Flow>then</Control Flow><br/>
<Normal Text>	</Normal Text><Command>cat</Command><Normal Text> </Normal Text><Redirection><<- "EOF"</Redirection><br/>
<Here Doc>		Indented text without a $dollar</Here Doc><br/>
<Redirection>	EOF</Redirection><br/>
<Control Flow>fi</Control Flow><br/>
<Normal Text></Normal Text><br/>
<Control Flow>if</Control Flow><Normal Text> </Normal Text><Expression>! </Expression><Keyword>{</Keyword><Normal Text> </Normal Text><OtherCommand>cmd1</OtherCommand><Normal Text> </Normal Text><Control>&&</Control><Normal Text> </Normal Text><OtherCommand>cmd2</OtherCommand><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Keyword>}</Keyword><Control>;</Control><Normal Text> </Normal Text><Control Flow>then</Control Flow><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> ok </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>fi</Control Flow><br/>
<Control Flow>if</Control Flow><Normal Text> </Normal Text><Expression>! </Expression><OtherCommand>cmd1</OtherCommand><Normal Text> arg</Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>then</Control Flow><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> ok </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>fi</Control Flow><br/>
<Normal Text></Normal Text><br/>
<Control Flow>case</Control Flow><Normal Text> 1 </Normal Text><Keyword>in</Keyword><br/>
<Pattern>2</Pattern><Keyword>)</Keyword><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> xxx</Normal Text><Control>;</Control><br/>
<Control Flow>;;</Control Flow><br/>
<Glob>?</Glob><Keyword>)</Keyword><Normal Text> </Normal Text><OtherCommand>foo</OtherCommand><Normal Text> </Normal Text><Control>||</Control><Normal Text> </Normal Text><OtherCommand>yyy</OtherCommand><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><OtherCommand>foo</OtherCommand><Normal Text> abc </Normal Text><Control>||</Control><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> abc </Normal Text><Control Flow>;;</Control Flow><br/>
<Pattern>1</Pattern><Keyword>)</Keyword><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> yyy</Normal Text><Control>;</Control><br/>
<Control Flow>esac</Control Flow><br/>
<Normal Text></Normal Text><br/>
<Command>ls</Command><Normal Text> </Normal Text><Comment>#should be outside of case 1 folding block</Comment><br/>
<Normal Text></Normal Text><br/>
<Control Flow>for</Control Flow><Normal Text> i </Normal Text><Keyword>in</Keyword><Normal Text> </Normal Text><Backquote>`</Backquote><Command>ls</Command><Normal Text> </Normal Text><Path>tests/auto/output/</Path><Glob>*</Glob><Path>.html</Path><Backquote>`</Backquote><Control>;</Control><Normal Text> </Normal Text><Control Flow>do</Control Flow><br/>
<Normal Text>    </Normal Text><Variable>refFile</Variable><Operator>=</Operator><Backquote>`</Backquote><Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$i</Variable><Normal Text> </Normal Text><Control>|</Control><Normal Text> </Normal Text><Command>sed</Command><Normal Text> </Normal Text><Option>-e</Option><Normal Text> s,build,src, </Normal Text><Control>|</Control><Normal Text> </Normal Text><Command>sed</Command><Normal Text> </Normal Text><Option>-e</Option><Normal Text> s,output,reference, </Normal Text><Control>|</Control><Normal Text> </Normal Text><Command>sed</Command><Normal Text> </Normal Text><Option>-e</Option><Normal Text> s,.html,.ref.html,</Normal Text><Backquote>`</Backquote><br/>
<Normal Text>    </Normal Text><Command>cp</Command><Normal Text> </Normal Text><Option>-v</Option><Normal Text> </Normal Text><Variable>$i</Variable><Normal Text> </Normal Text><Variable>$refFile</Variable><br/>
<Control Flow>done</Control Flow><br/>
<Normal Text></Normal Text><br/>
<Comment>## >Settings >Configure Kate >Fonts & Colors >Highlitghing Text Styles >Scripts/Bash >Option >Change colors to some distinct color</Comment><br/>
<Comment>## 1- In following line the -ucode should not be colored as option</Comment><br/>
<Normal Text></Normal Text><br/>
<OtherCommand>pacman</OtherCommand><Normal Text> </Normal Text><Option>-Syu</Option><Normal Text> </Normal Text><Option>--needed</Option><Normal Text> intel-ucode grub</Normal Text><br/>
<OtherCommand>pacman</OtherCommand><Normal Text> </Normal Text><Option>-syu</Option><Normal Text> </Normal Text><Option>--needed</Option><Normal Text> intel-ucode grub</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># Braces (bug ##387915)</Comment><br/>
<Keyword>[[</Keyword><Normal Text> </Normal Text><Variable>$line_name</Variable><Normal Text> </Normal Text><Expression>=~</Expression><Normal Text> </Normal Text><Escape>\{</Escape><Operator>([</Operator><Pattern>0</Pattern><Operator>-</Operator><Pattern>9</Pattern><Operator>]</Operator><Parameter Expansion>{</Parameter Expansion><Decimal>1</Decimal><Parameter Expansion Operator>,</Parameter Expansion Operator><Parameter Expansion>}</Parameter Expansion><Operator>)</Operator><Escape>\}\{</Escape><Operator>([</Operator><Pattern>0</Pattern><Operator>-</Operator><Pattern>9</Pattern><Operator>]</Operator><Parameter Expansion>{</Parameter Expansion><Decimal>1</Decimal><Parameter Expansion Operator>,</Parameter Expansion Operator><Parameter Expansion>}</Parameter Expansion><Operator>)</Operator><Escape>\}</Escape><Operator>(</Operator><Glob>.*</Glob><Operator>)</Operator><Normal Text> </Normal Text><Keyword>]]</Keyword><br/>
<Keyword>[[</Keyword><Normal Text> </Normal Text><Variable>$name</Variable><Normal Text> </Normal Text><Expression>=~</Expression><Normal Text> </Normal Text><Operator>(</Operator><Glob>.*</Glob><Operator>)</Operator><Pattern>_</Pattern><Operator>(</Operator><Pattern>S</Pattern><Operator>[</Operator><Pattern>0</Pattern><Operator>-</Operator><Pattern>9</Pattern><Operator>]</Operator><Parameter Expansion>{</Parameter Expansion><Decimal>2</Decimal><Parameter Expansion>}</Parameter Expansion><Operator>)(</Operator><Pattern>E</Pattern><Operator>[</Operator><Pattern>0</Pattern><Operator>-</Operator><Pattern>9</Pattern><Operator>]</Operator><Parameter Expansion>{</Parameter Expansion><Decimal>2</Decimal><Parameter Expansion Operator>,</Parameter Expansion Operator><Decimal>3</Decimal><Parameter Expansion>}</Parameter Expansion><Operator>[</Operator><Pattern>a</Pattern><Operator>-</Operator><Pattern>z</Pattern><Operator>]</Operator><Parameter Expansion>{</Parameter Expansion><Decimal>0</Decimal><Parameter Expansion Operator>,</Parameter Expansion Operator><Decimal>1</Decimal><Parameter Expansion>}</Parameter Expansion><Operator>)</Operator><Pattern>_</Pattern><Operator>(</Operator><Glob>.*</Glob><Operator>)</Operator><Normal Text> </Normal Text><Keyword>]]</Keyword><br/>
<Command>rm</Command><Normal Text> </Normal Text><Path>/data/</Path><Escape>{hello1</Escape><Operator>,</Operator><Escape>hello2}</Escape><Path>/input/</Path><Escape>{bye1</Escape><Operator>,</Operator><Variable>$bye2</Variable><Escape>}</Escape><Path>/si</Path><Escape>{a</Escape><Operator>,</Operator><Parameter Expansion>${</Parameter Expansion><Variable>b</Variable><Parameter Expansion>}</Parameter Expansion><Operator>,</Operator><Escape>c{k</Escape><Operator>,</Operator><Escape>p{e</Escape><Operator>,</Operator><Escape>a}}}</Escape><Path>/</Path><Glob>*</Glob><Path>.non</Path><br/>
<Command>rm</Command><Normal Text> </Normal Text><Path>/data/{aa,</Path><Escape>{e</Escape><Operator>,</Operator><Escape>i}</Escape><Path>t</Path><Escape>{b</Escape><Operator>,</Operator><Escape>c}</Escape><Normal Text> </Normal Text><Comment># Not closed</Comment><br/>
<Command>rm</Command><Normal Text> </Normal Text><Path>/data/</Path><Escape>{aa</Escape><Operator>,</Operator><Escape>{e</Escape><Operator>,</Operator><Escape>i}t{b</Escape><Operator>,</Operator><Escape>c}}</Escape><br/>
<Command>rm</Command><Normal Text> </Normal Text><Path>/data/</Path><Escape>{aa</Escape><Operator>,</Operator><Escape>{i}}</Escape><br/>
<Command>rm</Command><Normal Text> </Normal Text><Path>/data{aa{bb{cc{dd}}}}</Path><br/>
<Command>rm</Command><Normal Text> </Normal Text><Path>/data{aaa</Path><Backquote>`</Backquote><OtherCommand>aaa}aa</OtherCommand><Backquote>`</Backquote><Normal Text>aaa}a</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Parameter Expansion>${</Parameter Expansion><Variable>array</Variable><Parameter Expansion Operator>[</Parameter Expansion Operator><Decimal>0</Decimal><Parameter Expansion Operator>]:</Parameter Expansion Operator><Normal Text> -</Normal Text><Decimal>7</Decimal><Normal Text> </Normal Text><Parameter Expansion Operator>:</Parameter Expansion Operator><Normal Text> +  </Normal Text><Decimal>22</Decimal><Normal Text>  </Normal Text><Variable>}</Variable><Normal Text>  </Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>array</Variable><Parameter Expansion Operator>[</Parameter Expansion Operator><Decimal>1</Decimal><Parameter Expansion Operator>]:</Parameter Expansion Operator><Normal Text> num  </Normal Text><Variable>}</Variable><br/>
<Parameter Expansion>${</Parameter Expansion><Variable>parameter</Variable><Parameter Expansion Operator>##</Parameter Expansion Operator><Normal Text>word</Normal Text><Parameter Expansion>}</Parameter Expansion><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>parameter</Variable><Parameter Expansion Operator>%%</Parameter Expansion Operator><Normal Text>word</Normal Text><Parameter Expansion>}</Parameter Expansion><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>parameter</Variable><Parameter Expansion Operator>^^</Parameter Expansion Operator><Pattern>pattern</Pattern><Parameter Expansion>}</Parameter Expansion><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>parameter</Variable><Parameter Expansion Operator>,,</Parameter Expansion Operator><Pattern>pattern</Pattern><Parameter Expansion>}</Parameter Expansion><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>parameter</Variable><Parameter Expansion Operator>@</Parameter Expansion Operator><Error>operator</Error><Variable>}</Variable><br/>
<Normal Text></Normal Text><br/>
<Comment># </Comment><Alert Level 2>TODO</Alert Level 2><Comment> `</Comment><br/>
<Normal Text></Normal Text><br/>
<Comment># commands</Comment><br/>
<OtherCommand>abc</OtherCommand><br/>
<Command>cp</Command><br/>
<Builtin>:</Builtin><br/>
<Builtin>.</Builtin><br/>
<OtherCommand>:#nokeyword</OtherCommand><br/>
<OtherCommand>path/cmd</OtherCommand><br/>
<OtherCommand>ec</OtherCommand><Escape>\</Escape><br/>
<OtherCommand>ho</OtherCommand><br/>
<OtherCommand>2</OtherCommand><br/>
<OtherCommand>{ab}c</OtherCommand><br/>
<Escape>{a</Escape><Operator>,</Operator><Escape>b}</Escape><OtherCommand>c</OtherCommand><br/>
<String SingleQ>'a'</String SingleQ><OtherCommand>c</OtherCommand><br/>
<Variable>$ab</Variable><br/>
<Parameter Expansion>${</Parameter Expansion><Variable>ab</Variable><Parameter Expansion>}</Parameter Expansion><OtherCommand>c</OtherCommand><br/>
<OtherCommand>\ a</OtherCommand><br/>
<OtherCommand>!a</OtherCommand><br/>
<OtherCommand>{ab}[</OtherCommand><br/>
<Escape>{a</Escape><Operator>,</Operator><Escape>b}</Escape><OtherCommand>[</OtherCommand><br/>
<String SingleQ>'a'</String SingleQ><OtherCommand>[</OtherCommand><br/>
<OtherCommand>\ [</OtherCommand><br/>
<OtherCommand>!a[</OtherCommand><br/>
<OtherCommand>a{}d</OtherCommand><br/>
<OtherCommand>a{bc}d</OtherCommand><br/>
<OtherCommand>a</OtherCommand><Escape>{b</Escape><Operator>,</Operator><Escape>c}</Escape><OtherCommand>d</OtherCommand><br/>
<OtherCommand>a</OtherCommand><String SingleQ>'b'</String SingleQ><OtherCommand>c</OtherCommand><br/>
<OtherCommand>a</OtherCommand><Variable>$bc</Variable><br/>
<OtherCommand>a</OtherCommand><Parameter Expansion>${</Parameter Expansion><Variable>bc</Variable><Parameter Expansion>}</Parameter Expansion><OtherCommand>d</OtherCommand><br/>
<OtherCommand>a\ b</OtherCommand><br/>
<OtherCommand>a!b</OtherCommand><br/>
<OtherCommand>a{}[</OtherCommand><br/>
<OtherCommand>a{bc}[</OtherCommand><br/>
<OtherCommand>a</OtherCommand><Escape>{b</Escape><Operator>,</Operator><Escape>c}</Escape><OtherCommand>[</OtherCommand><br/>
<OtherCommand>a</OtherCommand><String SingleQ>'b'</String SingleQ><OtherCommand>[</OtherCommand><br/>
<OtherCommand>a\ [</OtherCommand><br/>
<OtherCommand>a!b[</OtherCommand><br/>
<Normal Text></Normal Text><br/>
<Comment># commands + params</Comment><br/>
<OtherCommand>shortopt</OtherCommand><Normal Text> </Normal Text><Option>-ol</Option><Normal Text> </Normal Text><Option>-f</Option><Path>/fd/fd</Path><Normal Text> </Normal Text><Option>-hfd</Option><Path>/fds</Path><Normal Text> </Normal Text><Option>-</Option><Normal Text> </Normal Text><Option>-ol</Option><String SingleQ>'a'</String SingleQ><Option>b</Option><Normal Text> </Normal Text><Option>-f</Option><String SingleQ>'a'</String SingleQ><Path>/fd/fd</Path><Normal Text> </Normal Text><Option>-h</Option><String SingleQ>'a'</String SingleQ><Option>fd</Option><Path>/fds</Path><br/>
<OtherCommand>longopt</OtherCommand><Normal Text> </Normal Text><Option>--long-a</Option><Normal Text> </Normal Text><Option>--long-b</Option><Operator>=</Operator><Normal Text>value </Normal Text><Option>--file</Option><Operator>=</Operator><Glob>*</Glob><Normal Text> </Normal Text><Option>--file</Option><Operator>=</Operator><Path>file</Path><Glob>*</Glob><Normal Text> </Normal Text><Option>--file</Option><Operator>=</Operator><Path>dir/file</Path><br/>
<OtherCommand>longopt</OtherCommand><Normal Text> </Normal Text><Option>--long-a</Option><String SingleQ>'a'</String SingleQ><Option>b</Option><Normal Text> </Normal Text><Option>--long</Option><String SingleQ>'a'</String SingleQ><Option>-b</Option><Operator>=</Operator><Normal Text>value </Normal Text><Option>--fi</Option><String SingleQ>'a'</String SingleQ><Option>le</Option><Operator>=</Operator><Glob>*</Glob><br/>
<OtherCommand>noopt</OtherCommand><Normal Text> 3 3d </Normal Text><Option>-f</Option><Normal Text> </Normal Text><Option>--</Option><Normal Text> </Normal Text><Option>-f</Option><Normal Text> </Normal Text><Option>--xx</Option><Normal Text> </Normal Text><Path>dir/file</Path><br/>
<OtherCommand>opt</OtherCommand><Normal Text> param#nocomment ab</Normal Text><String SingleQ>'a'</String SingleQ><Normal Text>cd [[ param ]] } { ~a .a </Normal Text><Comment>#comments</Comment><br/>
<OtherCommand>path</OtherCommand><Normal Text> </Normal Text><Path>path/file</Path><Normal Text> </Normal Text><Path>dir/</Path><Normal Text> </Normal Text><Path>/</Path><Normal Text> </Normal Text><Path>//</Path><Normal Text> </Normal Text><Path>3/f</Path><Normal Text> </Normal Text><Path>a@/</Path><Normal Text> </Normal Text><String SingleQ>'a'</String SingleQ><Path>/b</Path><Normal Text> </Normal Text><Path>d/</Path><String SingleQ>'a'</String SingleQ><Path>b</Path><Normal Text> </Normal Text><Path>a\ d/f</Path><Normal Text> </Normal Text><Path>f/f</Path><Escape>\</Escape><br/>
<Path>ile</Path><br/>
<OtherCommand>path</OtherCommand><Normal Text> </Normal Text><Path>~</Path><Normal Text> </Normal Text><Path>~/</Path><Normal Text> </Normal Text><Path>~a/</Path><Normal Text> </Normal Text><Path>.</Path><Normal Text> </Normal Text><Path>..</Path><Normal Text> </Normal Text><Path>./a</Path><Normal Text> </Normal Text><Path>../a</Path><br/>
<OtherCommand>path</OtherCommand><Normal Text> </Normal Text><Path>/path/</Path><Glob>*</Glob><Normal Text> </Normal Text><Path>/path/f</Path><Glob>*</Glob><Normal Text> </Normal Text><Path>/path/f@</Path><Normal Text> </Normal Text><Path>/path/f</Path><Glob>@(|)</Glob><Normal Text> {</Normal Text><Path>a/b}</Path><Normal Text> </Normal Text><Path>a{b}/c</Path><Normal Text> </Normal Text><Path>a/b{c}</Path><Normal Text> </Normal Text><Path>a/{b}</Path><Normal Text> </Normal Text><Path>a/{b}c</Path><br/>
<OtherCommand>glob</OtherCommand><Normal Text> </Normal Text><Glob>?</Glob><Normal Text> </Normal Text><Glob>*</Glob><Normal Text> </Normal Text><Glob>?</Glob><Path>f</Path><Normal Text> </Normal Text><Glob>*</Glob><Path>f</Path><Normal Text> </Normal Text><Path>f</Path><Glob>*</Glob><Normal Text> </Normal Text><Path>f</Path><Glob>?</Glob><Normal Text> </Normal Text><Glob>**</Glob><Path>/</Path><Normal Text> </Normal Text><Path>~/</Path><Glob>*</Glob><Normal Text> </Normal Text><Path>~</Path><Glob>*</Glob><Normal Text> </Normal Text><Path>/path/f</Path><Glob>*</Glob><Normal Text> </Normal Text><String SingleQ>'a'</String SingleQ><Glob>*</Glob><Normal Text> </Normal Text><String SingleQ>'a'</String SingleQ><Path>f/</Path><Glob>?</Glob><br/>
<OtherCommand>extglob</OtherCommand><Normal Text> @ </Normal Text><Glob>@(*)</Glob><Normal Text> </Normal Text><Glob>@(</Glob><Path>f</Path><Glob>*|</Glob><Path>f</Path><Glob>??(</Glob><Path>f</Path><Glob>))</Glob><Normal Text> </Normal Text><Path>f</Path><Glob>!(+(?(@(*(</Glob><Path>f</Path><Glob>)</Glob><Path>f</Path><Glob>)</Glob><Path>f</Path><Glob>)</Glob><Path>f</Path><Glob>)</Glob><Path>f</Path><Glob>)</Glob><Path>f</Path><Normal Text> @</Normal Text><String SingleQ>'a'</String SingleQ><Glob>@(|)</Glob><Normal Text> </Normal Text><Path>a</Path><Glob>@(?)</Glob><br/>
<OtherCommand>subs</OtherCommand><Normal Text> f! f!! f!s </Normal Text><String SingleQ>'a'</String SingleQ><Normal Text>!s </Normal Text><Escape>\(</Escape><Normal Text> </Normal Text><Variable>$v</Variable><Normal Text> </Normal Text><Escape>{a</Escape><Operator>,</Operator><Escape>b}</Escape><Normal Text> {a} {</Normal Text><Path>a}/d</Path><Normal Text> {a</Normal Text><Escape>\,</Escape><Normal Text>} </Normal Text><Escape>{a</Escape><Operator>,</Operator><Escape>}</Escape><Normal Text> </Normal Text><Escape>{a</Escape><Operator>,</Operator><Escape>\}</Escape><Operator>,</Operator><Escape>b}</Escape><Normal Text> </Normal Text><Path>ds/</Path><Escape>{a</Escape><Operator>,</Operator><Escape>b}</Escape><Path>sa/s</Path><br/>
<OtherCommand>2</OtherCommand><Normal Text> </Normal Text><Option>-</Option><Normal Text> f </Normal Text><Option>-f</Option><br/>
<OtherCommand>!a</OtherCommand><Normal Text> </Normal Text><Option>-f</Option><br/>
<String SingleQ>'a'</String SingleQ><Normal Text> </Normal Text><Option>-f</Option><br/>
<Variable>$a</Variable><Normal Text> </Normal Text><Option>-f</Option><br/>
<Normal Text></Normal Text><br/>
<Comment># redirections (prefix)</Comment><br/>
<Redirection><<<</Redirection><Normal Text>s </Normal Text><Command>cat</Command><br/>
<Redirection><<<</Redirection><String SingleQ>'s'</String SingleQ><Normal Text> </Normal Text><Command>cat</Command><br/>
<Redirection><<<</Redirection><String SingleQ>'s'</String SingleQ><Normal Text>s </Normal Text><Command>cat</Command><br/>
<Redirection><<<</Redirection><Normal Text>s</Normal Text><String SingleQ>'s'</String SingleQ><Normal Text>s </Normal Text><Command>cat</Command><br/>
<Redirection><<<</Redirection><Normal Text>s</Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>s</Variable><Parameter Expansion>}</Parameter Expansion><Normal Text>s </Normal Text><Command>cat</Command><br/>
<Redirection><<<</Redirection><Normal Text> s</Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>s</Variable><Parameter Expansion>}</Parameter Expansion><Normal Text>s </Normal Text><Command>cat</Command><br/>
<Redirection>>&</Redirection><File Descriptor>2</File Descriptor><Normal Text> </Normal Text><Command>cat</Command><br/>
<Redirection><</Redirection><Path>f</Path><Normal Text> </Normal Text><Command>cat</Command><br/>
<File Descriptor>2</File Descriptor><Redirection>></Redirection><Path>3</Path><Normal Text> </Normal Text><Command>cat</Command><br/>
<File Descriptor>2</File Descriptor><Redirection>>&</Redirection><File Descriptor>3</File Descriptor><Normal Text> </Normal Text><Command>cat</Command><br/>
<File Descriptor>2</File Descriptor><Redirection>>&</Redirection><Normal Text> </Normal Text><File Descriptor>3</File Descriptor><Normal Text> </Normal Text><Command>cat</Command><br/>
<File Descriptor>2</File Descriptor><Redirection>></Redirection><Path>f</Path><Normal Text> </Normal Text><Command>cat</Command><br/>
<Redirection>&></Redirection><Path>f</Path><Normal Text> </Normal Text><Command>cat</Command><br/>
<Normal Text></Normal Text><br/>
<Comment># redirections</Comment><br/>
<Command>cat</Command><Normal Text> f</Normal Text><Redirection>></Redirection><Path>2</Path><br/>
<Command>cat</Command><Normal Text> </Normal Text><Path>d/f</Path><Redirection>></Redirection><Path>2</Path><br/>
<Command>cat</Command><Normal Text> </Normal Text><Path>d/f</Path><Normal Text> </Normal Text><Redirection>></Redirection><Path>2</Path><br/>
<Command>cat</Command><Normal Text> </Normal Text><Path>d/f</Path><Normal Text> </Normal Text><Redirection>>&</Redirection><Normal Text> </Normal Text><File Descriptor>2</File Descriptor><br/>
<Command>cat</Command><Normal Text> </Normal Text><Redirection>></Redirection><Path>2</Path><Normal Text> </Normal Text><Path>d/f</Path><br/>
<Command>cat</Command><Normal Text> </Normal Text><Redirection>></Redirection><Normal Text> </Normal Text><Path>2</Path><br/>
<Command>cat</Command><Normal Text> </Normal Text><Redirection><(</Redirection><Builtin>echo</Builtin><Redirection>)</Redirection><Normal Text> </Normal Text><Redirection><(</Redirection><Builtin>echo</Builtin><Normal Text> a</Normal Text><Redirection>)</Redirection><Normal Text> </Normal Text><Redirection><(</Redirection><Builtin>echo</Builtin><Normal Text> </Normal Text><Path>a/f</Path><Redirection>)</Redirection><Normal Text> </Normal Text><Redirection><(</Redirection><Builtin>echo</Builtin><Normal Text> </Normal Text><Redirection>)</Redirection><Normal Text> </Normal Text><Redirection><(</Redirection><Builtin>echo</Builtin><Normal Text> a </Normal Text><Redirection>)</Redirection><Normal Text> </Normal Text><Redirection><(</Redirection><Builtin>echo</Builtin><Normal Text> </Normal Text><Path>a/f</Path><Normal Text> </Normal Text><Redirection>)</Redirection><br/>
<Command>cat</Command><Normal Text> </Normal Text><File Descriptor>2</File Descriptor><Redirection>>&</Redirection><File Descriptor>1</File Descriptor><Normal Text> </Normal Text><Redirection>&></Redirection><Path>f</Path><Normal Text> </Normal Text><Redirection>&>></Redirection><Path>f</Path><Normal Text> </Normal Text><File Descriptor>2</File Descriptor><Redirection><&</Redirection><File Descriptor>1</File Descriptor><Keyword>-</Keyword><Normal Text> </Normal Text><File Descriptor>2</File Descriptor><Redirection><></Redirection><Path>f</Path><Normal Text> </Normal Text><File Descriptor>2</File Descriptor><Redirection><<heredoc</Redirection><br/>
<Here Doc>bla bla</Here Doc><br/>
<Redirection>heredoc</Redirection><br/>
<Redirection><<-'h'</Redirection><Normal Text> </Normal Text><Command>cat</Command><br/>
<Here Doc>bla</Here Doc><br/>
<Redirection>h</Redirection><br/>
<Redirection><<"'"</Redirection><Normal Text> </Normal Text><Command>cat</Command><br/>
<Here Doc>bla</Here Doc><br/>
<Redirection>'</Redirection><br/>
<Variable>r</Variable><Operator>=</Operator><Parameter Expansion>$(</Parameter Expansion><OtherCommand>xxx</OtherCommand><Normal Text> </Normal Text><Variable>$@</Variable><Normal Text> </Normal Text><File Descriptor>2</File Descriptor><Redirection>>&</Redirection><File Descriptor>1</File Descriptor><Parameter Expansion>)</Parameter Expansion><br/>
<Normal Text></Normal Text><br/>
<Comment># branches</Comment><br/>
<Command>cat</Command><Normal Text> a</Normal Text><Control>|</Control><Command>cat</Command><br/>
<Command>cat</Command><Normal Text> a</Normal Text><Control>&</Control><Command>cat</Command><br/>
<Command>cat</Command><Normal Text> a</Normal Text><Control>||</Control><Command>cat</Command><br/>
<Command>cat</Command><Normal Text> a</Normal Text><Control>&&</Control><Command>cat</Command><br/>
<Command>cat</Command><Normal Text> a</Normal Text><Control>;</Control><Command>cat</Command><br/>
<Command>cat</Command><Normal Text> a </Normal Text><Control>|</Control><Normal Text> </Normal Text><Command>cat</Command><br/>
<Command>cat</Command><Normal Text> a </Normal Text><Control>&</Control><Normal Text> </Normal Text><Command>cat</Command><br/>
<Command>cat</Command><Normal Text> a </Normal Text><Control>||</Control><Normal Text> </Normal Text><Command>cat</Command><br/>
<Command>cat</Command><Normal Text> a </Normal Text><Control>&&</Control><Normal Text> </Normal Text><Command>cat</Command><br/>
<Command>cat</Command><Normal Text> a </Normal Text><Control>;</Control><Normal Text> </Normal Text><Command>cat</Command><br/>
<Command>cat</Command><Normal Text> a</Normal Text><String SingleQ>'a'</String SingleQ><Control>;</Control><Command>cat</Command><br/>
<Normal Text></Normal Text><br/>
<Comment># substitutions</Comment><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><String SingleQ>''</String SingleQ><Normal Text> </Normal Text><String SingleQ>'a'</String SingleQ><Normal Text> </Normal Text><String SingleQ>'\'</String SingleQ><Normal Text> </Normal Text><String DoubleQ>""</String DoubleQ><Normal Text> </Normal Text><String DoubleQ>"a"</String DoubleQ><Normal Text> </Normal Text><String DoubleQ>"</String DoubleQ><String Escape>\\</String Escape><String DoubleQ>"</String DoubleQ><Normal Text> </Normal Text><String DoubleQ>"</String DoubleQ><Variable>$a</Variable><String DoubleQ>"</String DoubleQ><Normal Text> </Normal Text><String DoubleQ>"a""a"</String DoubleQ><String SingleQ>'a''a'</String SingleQ><Normal Text> a</Normal Text><String SingleQ>'b'</String SingleQ><Normal Text>c a</Normal Text><String DoubleQ>"b"</String DoubleQ><Normal Text>c a</Normal Text><String SingleQ>$'</String SingleQ><String Escape>\n</String Escape><String SingleQ>'</String SingleQ><Normal Text>c</Normal Text><br/>
<Builtin>echo</Builtin><Normal Text> a!bc a{a}b a</Normal Text><Escape>{b</Escape><Operator>,</Operator><Escape>c}</Escape><Normal Text>d a</Normal Text><Escape>{b</Escape><Operator>,</Operator><Escape>{d</Escape><Operator>,</Operator><Escape>e}}</Escape><Normal Text>d a</Normal Text><Escape>\ </Escape><Normal Text>b</Normal Text><br/>
<Builtin>echo</Builtin><Normal Text> a</Normal Text><Variable>$bc</Variable><Normal Text> a</Normal Text><Variable>$b</Variable><Path>/c</Path><Normal Text> a</Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>b</Variable><Parameter Expansion>}</Parameter Expansion><Normal Text>c a</Normal Text><Parameter Expansion>$((</Parameter Expansion><Variable>b</Variable><Operator>-</Operator><Decimal>3</Decimal><Variable>))</Variable><Normal Text>c a</Normal Text><Parameter Expansion>$(</Parameter Expansion><OtherCommand>b</OtherCommand><Parameter Expansion>)</Parameter Expansion><Normal Text>c a</Normal Text><Parameter Expansion>$(</Parameter Expansion><OtherCommand>a</OtherCommand><Normal Text> b c</Normal Text><Parameter Expansion>)</Parameter Expansion><Normal Text>c</Normal Text><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>a</Variable><Parameter Expansion Operator>[*]</Parameter Expansion Operator><Parameter Expansion>}</Parameter Expansion><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>a</Variable><Parameter Expansion Operator>[@]</Parameter Expansion Operator><Parameter Expansion>}</Parameter Expansion><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>a</Variable><Parameter Expansion Operator>[</Parameter Expansion Operator><Parameter Expansion>${</Parameter Expansion><Variable>b</Variable><Parameter Expansion>}</Parameter Expansion><Parameter Expansion Operator>]</Parameter Expansion Operator><Parameter Expansion>}</Parameter Expansion><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>a</Variable><Parameter Expansion Operator>:-</Parameter Expansion Operator><Normal Text>x</Normal Text><Variable>$z</Variable><Parameter Expansion>}</Parameter Expansion><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>a</Variable><Parameter Expansion Operator>-</Parameter Expansion Operator><Normal Text>x</Normal Text><Parameter Expansion>}</Parameter Expansion><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>a</Variable><Parameter Expansion Operator>/</Parameter Expansion Operator><Pattern>g</Pattern><Parameter Expansion>}</Parameter Expansion><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>a</Variable><Parameter Expansion Operator>//</Parameter Expansion Operator><Pattern>f</Pattern><Parameter Expansion Operator>/</Parameter Expansion Operator><Normal Text>f</Normal Text><Parameter Expansion>}</Parameter Expansion><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>a</Variable><Parameter Expansion Operator>//</Parameter Expansion Operator><Pattern>f</Pattern><Glob>*</Glob><Parameter Expansion Operator>/</Parameter Expansion Operator><Path>f</Path><Glob>*</Glob><Parameter Expansion>}</Parameter Expansion><br/>
<Builtin>echo</Builtin><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>a</Variable><Parameter Expansion Operator>^^</Parameter Expansion Operator><Pattern>l</Pattern><Glob>*</Glob><Parameter Expansion>}</Parameter Expansion><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>a</Variable><Parameter Expansion Operator>,</Parameter Expansion Operator><Parameter Expansion>}</Parameter Expansion><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Parameter Expansion Operator>!</Parameter Expansion Operator><Variable>a</Variable><Parameter Expansion>}</Parameter Expansion><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Parameter Expansion Operator>#</Parameter Expansion Operator><Variable>a</Variable><Parameter Expansion Operator>[</Parameter Expansion Operator><Decimal>1</Decimal><Parameter Expansion Operator>]</Parameter Expansion Operator><Parameter Expansion>}</Parameter Expansion><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>a</Variable><Parameter Expansion Operator>:</Parameter Expansion Operator><Decimal>1</Decimal><Parameter Expansion Operator>:</Parameter Expansion Operator><Variable>$b}</Variable><Normal Text> </Normal Text><Parameter Expansion>$((</Parameter Expansion><Operator>++</Operator><Variable>i</Variable><Control>,</Control><Variable>i</Variable><Operator>--</Operator><Variable>))</Variable><br/>
<Normal Text></Normal Text><br/>
<Builtin>[</Builtin><Normal Text> a </Normal Text><Builtin>]</Builtin><br/>
<Builtin>[</Builtin><Normal Text> </Normal Text><Expression>-f</Expression><Normal Text> f</Normal Text><String SingleQ>'f'</String SingleQ><Normal Text>f </Normal Text><Builtin>]</Builtin><br/>
<Builtin>[</Builtin><Normal Text> </Normal Text><Expression>-f</Expression><Normal Text> f]</Normal Text><String SingleQ>'f'</String SingleQ><Normal Text>f] </Normal Text><Builtin>]</Builtin><br/>
<Builtin>[</Builtin><Normal Text> </Normal Text><Expression>-t</Expression><Normal Text> 13 </Normal Text><Builtin>]</Builtin><br/>
<Builtin>[</Builtin><Normal Text> </Normal Text><Expression>-t</Expression><Normal Text> 13] </Normal Text><Builtin>]</Builtin><br/>
<Builtin>[</Builtin><Normal Text> </Normal Text><Expression>-t</Expression><Normal Text> 13] </Normal Text><Builtin>]</Builtin><br/>
<Builtin>[</Builtin><Normal Text> </Normal Text><Expression>-v</Expression><Normal Text> abc </Normal Text><Builtin>]</Builtin><br/>
<Builtin>[</Builtin><Normal Text> </Normal Text><Expression>-z</Expression><Normal Text> abc </Normal Text><Builtin>]</Builtin><br/>
<Builtin>[</Builtin><Normal Text> abc </Normal Text><Expression>-ef</Expression><Normal Text> abc </Normal Text><Builtin>]</Builtin><br/>
<Builtin>[</Builtin><Normal Text> abc </Normal Text><Expression>-ef</Expression><Normal Text> abc </Normal Text><Builtin>]</Builtin><br/>
<Builtin>[</Builtin><Normal Text> abc-ef </Normal Text><Expression>-ef</Expression><Normal Text> abc-ef </Normal Text><Builtin>]</Builtin><br/>
<Builtin>[</Builtin><Normal Text> abc </Normal Text><Expression>==</Expression><Normal Text> abc </Normal Text><Builtin>]</Builtin><br/>
<Builtin>[</Builtin><Normal Text> abc </Normal Text><Error><</Error><Normal Text> abc </Normal Text><Builtin>]</Builtin><br/>
<Builtin>[</Builtin><Normal Text> abc </Normal Text><Expression>-eq</Expression><Normal Text> abc </Normal Text><Builtin>]</Builtin><br/>
<Keyword>[[</Keyword><Normal Text> abc </Normal Text><Expression>-eq</Expression><Normal Text> abc </Normal Text><Keyword>]]</Keyword><br/>
<Builtin>[</Builtin><Normal Text> 1+2 </Normal Text><Expression>-eq</Expression><Normal Text> 1+2 </Normal Text><Builtin>]</Builtin><br/>
<Keyword>[[</Keyword><Normal Text> 1+2 </Normal Text><Expression>-eq</Expression><Normal Text> 1+2 </Normal Text><Keyword>]]</Keyword><br/>
<Builtin>[</Builtin><Normal Text> a </Normal Text><Expression>=</Expression><Normal Text> b </Normal Text><Error>c</Error><Normal Text> </Normal Text><OtherCommand>]</OtherCommand><br/>
<Keyword>[[</Keyword><Normal Text> a </Normal Text><Expression>=</Expression><Normal Text> b </Normal Text><Error>c</Error><Normal Text> </Normal Text><OtherCommand>]]</OtherCommand><br/>
<Keyword>[[</Keyword><Normal Text> x </Normal Text><Expression>=~</Expression><Normal Text> </Normal Text><Pattern>a</Pattern><Operator>(</Operator><Pattern>b c</Pattern><Glob>|</Glob><Operator>$)</Operator><String SingleQ>' '</String SingleQ><Parameter Expansion>{</Parameter Expansion><Decimal>1</Decimal><Parameter Expansion Operator>,</Parameter Expansion Operator><Parameter Expansion>}</Parameter Expansion><Operator>[</Operator><Pattern>a</Pattern><Parameter Expansion Operator>[.</Parameter Expansion Operator><Parameter Expansion>digit</Parameter Expansion><Parameter Expansion Operator>.]</Parameter Expansion Operator><Operator>]</Operator><Normal Text> </Normal Text><Keyword>]]</Keyword><br/>
<Keyword>[[</Keyword><Normal Text> x </Normal Text><Expression>=~</Expression><Normal Text> </Normal Text><Operator>[</Operator><Normal Text> </Normal Text><Error>] </Error><OtherCommand>]]</OtherCommand><br/>
<Keyword>[[</Keyword><Normal Text> x </Normal Text><Expression>=~</Expression><Normal Text> </Normal Text><Operator>([</Operator><Pattern> </Pattern><Operator>])</Operator><Normal Text> </Normal Text><Keyword>]]</Keyword><br/>
<Keyword>[[</Keyword><Normal Text> x </Normal Text><Expression>=~</Expression><Normal Text> </Normal Text><Operator>[</Operator><Normal Text> </Normal Text><Keyword>]]</Keyword><br/>
<Keyword>[[</Keyword><Normal Text> x </Normal Text><Expression>=~</Expression><Normal Text> </Normal Text><Operator>([)</Operator><Normal Text> </Normal Text><Keyword>]]</Keyword><br/>
<Keyword>[[</Keyword><Normal Text> a</Normal Text><Expression><</Expression><Normal Text>b </Normal Text><Keyword>]]</Keyword><br/>
<Keyword>[[</Keyword><Normal Text> a </Normal Text><Expression><</Expression><Normal Text>b </Normal Text><Keyword>]]</Keyword><br/>
<Keyword>[[</Keyword><Normal Text> a</Normal Text><Expression><</Expression><Normal Text> b </Normal Text><Keyword>]]</Keyword><br/>
<Keyword>[[</Keyword><Normal Text> a </Normal Text><Expression><</Expression><Normal Text> b </Normal Text><Keyword>]]</Keyword><br/>
<Keyword>[[</Keyword><Operator>(</Operator><Expression>!</Expression><Normal Text> </Normal Text><Expression>-d</Expression><Normal Text> </Normal Text><Path>.</Path><Operator>)</Operator><Keyword>]]</Keyword><br/>
<Keyword>[[</Keyword><Normal Text> </Normal Text><Expression>!</Expression><Normal Text> </Normal Text><Expression>-d</Expression><Normal Text> </Normal Text><Path>.</Path><Normal Text> </Normal Text><Keyword>]]</Keyword><br/>
<Keyword>[[</Keyword><Normal Text> </Normal Text><Expression>!</Expression><Operator>(</Operator><Expression>-d</Expression><Normal Text> </Normal Text><Path>.</Path><Operator>)</Operator><Normal Text> </Normal Text><Keyword>]]</Keyword><br/>
<Keyword>[[</Keyword><Normal Text> </Normal Text><Expression>-f</Expression><Normal Text> a </Normal Text><Control>||</Control><Normal Text> </Normal Text><Expression>-f</Expression><Normal Text> b </Normal Text><Keyword>]]</Keyword><br/>
<Keyword>[[</Keyword><Normal Text> </Normal Text><Expression>-f</Expression><Normal Text> a</Normal Text><Control>||</Control><Expression>-f</Expression><Normal Text> b </Normal Text><Keyword>]]</Keyword><br/>
<Builtin>[</Builtin><Normal Text> </Normal Text><Expression>-d</Expression><Normal Text> </Normal Text><Backquote>`</Backquote><Builtin>echo</Builtin><Normal Text> .</Normal Text><Backquote>`</Backquote><Normal Text>] </Normal Text><Builtin>]</Builtin><br/>
<Keyword>[[</Keyword><Normal Text> </Normal Text><Expression>-d</Expression><Normal Text> </Normal Text><Backquote>`</Backquote><Builtin>echo</Builtin><Normal Text> .</Normal Text><Backquote>`</Backquote><Normal Text>]] </Normal Text><Keyword>]]</Keyword><br/>
<Keyword>[[</Keyword><Normal Text> a </Normal Text><Expression>!=</Expression><Normal Text> b </Normal Text><Control>&&</Control><Normal Text> </Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>a</Variable><Parameter Expansion>}</Parameter Expansion><Normal Text>a </Normal Text><Expression>=</Expression><Normal Text> b</Normal Text><Parameter Expansion>${</Parameter Expansion><Variable>b</Variable><Parameter Expansion>}</Parameter Expansion><Normal Text> </Normal Text><Keyword>]]</Keyword><br/>
<Normal Text></Normal Text><br/>
<Keyword>((</Keyword><Decimal>3</Decimal><Operator>+</Operator><Decimal>1</Decimal><Operator>+</Operator><Variable>a</Variable><Operator>+</Operator><Variable>$c</Variable><Operator>*</Operator><Normal Text>(</Normal Text><Variable>x</Variable><Normal Text>) </Normal Text><Operator>&</Operator><Normal Text> </Normal Text><Hex>0x43422fd</Hex><Operator>+</Operator><Octal>03</Octal><Operator>-</Operator><Decimal>085</Decimal><Operator>/</Operator><Base>23#</Base><BaseN>D9a@_</BaseN><Operator>^</Operator><Decimal>8</Decimal><Keyword>))</Keyword><br/>
<Keyword>((</Keyword><Decimal>1</Decimal><Operator>/</Operator><Normal Text>(</Normal Text><Decimal>2</Decimal><Operator>-</Operator><Normal Text>(</Normal Text><Variable>a</Variable><Operator>-</Operator><Decimal>4</Decimal><Normal Text>))</Normal Text><Keyword>))</Keyword><br/>
<Normal Text></Normal Text><br/>
<Comment># they are not arithmetic evaluations...</Comment><br/>
<Keyword>((</Keyword><OtherCommand>cmd</OtherCommand><Normal Text> </Normal Text><Control>&&</Control><Normal Text> </Normal Text><OtherCommand>cmd</OtherCommand><Keyword>)</Keyword><Normal Text> </Normal Text><Control>||</Control><Normal Text> </Normal Text><OtherCommand>cmd</OtherCommand><Keyword>)</Keyword><br/>
<Parameter Expansion>$(</Parameter Expansion><Keyword>(</Keyword><OtherCommand>cmd</OtherCommand><Normal Text> </Normal Text><Control>&&</Control><Normal Text> </Normal Text><OtherCommand>cmd</OtherCommand><Keyword>)</Keyword><Normal Text> </Normal Text><Control>||</Control><Normal Text> </Normal Text><OtherCommand>cmd</OtherCommand><Parameter Expansion>)</Parameter Expansion><br/>
<Keyword>((</Keyword><Variable>cmd</Variable><Normal Text> </Normal Text><Control>&&</Control><br/>
<Variable>cmd</Variable><Keyword>)</Keyword><Normal Text> </Normal Text><Control>||</Control><Normal Text> </Normal Text><OtherCommand>cmd</OtherCommand><Keyword>)</Keyword><br/>
<Parameter Expansion>$((</Parameter Expansion><Variable>cmd</Variable><Normal Text> </Normal Text><Control>&&</Control><br/>
<Variable>cmd</Variable><Parameter Expansion>)</Parameter Expansion><Normal Text> </Normal Text><Control>||</Control><Normal Text> </Normal Text><OtherCommand>cmd</OtherCommand><Parameter Expansion>)</Parameter Expansion><br/>
<Normal Text></Normal Text><br/>
<Keyword>{</Keyword><Normal Text> </Normal Text><Builtin>echo</Builtin><br/>
<Normal Text>    </Normal Text><Builtin>echo</Builtin><br/>
<Keyword>}</Keyword><br/>
<Keyword>{</Keyword><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Keyword>}</Keyword><br/>
<Keyword>(</Keyword><Builtin>echo</Builtin><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Builtin>echo</Builtin><Keyword>)</Keyword><br/>
<Keyword>(</Keyword><Builtin>echo</Builtin><br/>
<Normal Text>    </Normal Text><Builtin>echo</Builtin><Keyword>)</Keyword><br/>
<Keyword>(</Keyword><Builtin>echo</Builtin><Normal Text> a</Normal Text><Keyword>)</Keyword><br/>
<Keyword>({</Keyword><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> plop</Normal Text><Control>;</Control><Keyword>})</Keyword><br/>
<Builtin>[</Builtin><Normal Text> a </Normal Text><Expression>-eq</Expression><Normal Text> 2 </Normal Text><Builtin>]</Builtin><Normal Text> </Normal Text><Control>||</Control><Normal Text> </Normal Text><Builtin>[</Builtin><Normal Text> a </Normal Text><Expression>-eq</Expression><Normal Text> 2] </Normal Text><Builtin>]</Builtin><Normal Text> </Normal Text><Control>&&</Control><Normal Text> </Normal Text><Keyword>[[</Keyword><Normal Text> a </Normal Text><Expression>-eq</Expression><Normal Text> 2 </Normal Text><Keyword>]]</Keyword><Normal Text> </Normal Text><Control>||</Control><Normal Text> </Normal Text><Keyword>[[</Keyword><Normal Text> a </Normal Text><Expression>!=</Expression><Normal Text> b </Normal Text><Keyword>]]</Keyword><Control>;</Control><br/>
<Builtin>[</Builtin><Normal Text> a </Normal Text><Expression>-eq</Expression><Normal Text> 2 </Normal Text><Builtin>]</Builtin><Control>||</Control><Builtin>[</Builtin><Normal Text> a </Normal Text><Expression>-eq</Expression><Normal Text> 2] </Normal Text><Builtin>]</Builtin><Control>&&</Control><Keyword>[[</Keyword><Normal Text> a </Normal Text><Expression>-eq</Expression><Normal Text> 2 </Normal Text><Keyword>]]</Keyword><Control>||</Control><Keyword>[[</Keyword><Normal Text> a </Normal Text><Expression>!=</Expression><Normal Text> b </Normal Text><Keyword>]]</Keyword><Control>;</Control><br/>
<Builtin>test</Builtin><Normal Text> a </Normal Text><Option>-eq</Option><Normal Text> b</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Comment># functions</Comment><br/>
<Function>a()</Function><Normal Text> </Normal Text><Keyword>{</Keyword><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> x</Normal Text><Control>;</Control><Normal Text> </Normal Text><Keyword>}</Keyword><br/>
<Function>a  ()</Function><Normal Text> </Normal Text><Keyword>{</Keyword><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> x</Normal Text><Control>;</Control><Normal Text> </Normal Text><Keyword>}</Keyword><br/>
<Keyword>function</Keyword><Function> f</Function><Normal Text> </Normal Text><Keyword>{</Keyword><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> x</Normal Text><Control>;</Control><Normal Text> </Normal Text><Keyword>}</Keyword><br/>
<Function>kde.org()</Function><Normal Text> </Normal Text><Keyword>{</Keyword><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> x</Normal Text><Control>;</Control><Normal Text> </Normal Text><Keyword>}</Keyword><br/>
<Function>--func()</Function><Normal Text> </Normal Text><Keyword>{</Keyword><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> x</Normal Text><Control>;</Control><Normal Text> </Normal Text><Keyword>}</Keyword><br/>
<Normal Text></Normal Text><br/>
<Comment># variables</Comment><br/>
<Variable>a</Variable><Operator>=</Operator><Variable>(</Variable><Normal Text>a b c</Normal Text><Variable>)</Variable><br/>
<Variable>a</Variable><Operator>=</Operator><String SingleQ>'a'</String SingleQ><br/>
<Variable>a</Variable><Operator>+=</Operator><Normal Text>b</Normal Text><br/>
<Variable>a</Variable><Parameter Expansion Operator>[</Parameter Expansion Operator><Decimal>1</Decimal><Parameter Expansion Operator>]</Parameter Expansion Operator><Operator>=</Operator><String SingleQ>'a'</String SingleQ><br/>
<Variable>a</Variable><Parameter Expansion Operator>[</Parameter Expansion Operator><Variable>$i</Variable><Parameter Expansion Operator>]</Parameter Expansion Operator><Operator>=</Operator><String SingleQ>'x'</String SingleQ><br/>
<Variable>a</Variable><Parameter Expansion Operator>[</Parameter Expansion Operator><Parameter Expansion>$((</Parameter Expansion><br/>
<Normal Text>    </Normal Text><Decimal>2</Decimal><Operator>+</Operator><Decimal>4</Decimal><br/>
<Variable>))</Variable><Parameter Expansion Operator>]</Parameter Expansion Operator><Operator>=</Operator><String SingleQ>'x'</String SingleQ><br/>
<Variable>a</Variable><Operator>=</Operator><Variable>(</Variable><Parameter Expansion Operator>[</Parameter Expansion Operator><Normal Text>a</Normal Text><Parameter Expansion Operator>]</Parameter Expansion Operator><Variable>=</Variable><Normal Text>2 </Normal Text><Backquote>`</Backquote><Builtin>echo</Builtin><Backquote>`</Backquote><Normal Text> -s </Normal Text><Error>></Error><Normal Text> </Normal Text><String SingleQ>'ds'</String SingleQ><Variable>)</Variable><br/>
<Variable>a</Variable><Operator>=</Operator><Variable>(</Variable><Comment>#comment</Comment><br/>
<Normal Text>value#nocomment </Normal Text><Comment>#comment)</Comment><br/>
<Variable>)</Variable><br/>
<Variable>a</Variable><Operator>=</Operator><Normal Text>a </Normal Text><Command>cat</Command><br/>
<Variable>a</Variable><Operator>=</Operator><Backquote>`</Backquote><Command>ls</Command><Backquote>`</Backquote><Normal Text> </Normal Text><Command>cat</Command><br/>
<Normal Text></Normal Text><br/>
<Comment># errors</Comment><br/>
<OtherCommand>a</OtherCommand><Normal Text> a</Normal Text><Error>(</Error><OtherCommand>s</OtherCommand><Keyword>)</Keyword><Normal Text> </Normal Text><OtherCommand>a</OtherCommand><br/>
<Normal Text></Normal Text><br/>
<Comment># control structure</Comment><br/>
<Control Flow>for</Control Flow><Normal Text> name </Normal Text><Keyword>in</Keyword><Normal Text> a b c </Normal Text><Escape>{d</Escape><Operator>,</Operator><Escape>e}</Escape><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>do</Control Flow><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>done</Control Flow><br/>
<Control Flow>for</Control Flow><Normal Text> name</Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>do</Control Flow><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>done</Control Flow><br/>
<Control Flow>for</Control Flow><Normal Text> name </Normal Text><Control Flow>do</Control Flow><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>done</Control Flow><br/>
<Control Flow>for</Control Flow><Normal Text> </Normal Text><Keyword>((</Keyword><Variable>i</Variable><Operator>=</Operator><Decimal>0</Decimal><Control>;</Control><Variable>i</Variable><Operator><</Operator><Decimal>5</Decimal><Control>;</Control><Operator>++</Operator><Variable>i</Variable><Keyword>))</Keyword><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>do</Control Flow><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$i</Variable><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>done</Control Flow><br/>
<Control Flow>select</Control Flow><Normal Text> name </Normal Text><Keyword>in</Keyword><Normal Text> a </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>do</Control Flow><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>done</Control Flow><br/>
<Control Flow>select</Control Flow><Normal Text> name</Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>do</Control Flow><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>done</Control Flow><br/>
<Control Flow>if</Control Flow><Normal Text> </Normal Text><Builtin>:</Builtin><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>then</Control Flow><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>elif</Control Flow><Normal Text> </Normal Text><Keyword>[[</Keyword><Normal Text> : </Normal Text><Keyword>]]</Keyword><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>then</Control Flow><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>else</Control Flow><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>fi</Control Flow><br/>
<Control Flow>while</Control Flow><Normal Text> </Normal Text><Builtin>:</Builtin><Normal Text> </Normal Text><Control>||</Control><Normal Text> </Normal Text><Builtin>:</Builtin><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>do</Control Flow><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>done</Control Flow><br/>
<Control Flow>until</Control Flow><Normal Text> </Normal Text><Builtin>:</Builtin><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Builtin>:</Builtin><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>do</Control Flow><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>done</Control Flow><br/>
<Control Flow>case</Control Flow><Normal Text> a </Normal Text><Keyword>in</Keyword><Normal Text> </Normal Text><Pattern>a</Pattern><Keyword>)</Keyword><Normal Text> </Normal Text><Control Flow>esac</Control Flow><br/>
<Control Flow>case</Control Flow><Normal Text> a </Normal Text><Keyword>in</Keyword><Normal Text> </Normal Text><Pattern>a</Pattern><Keyword>)</Keyword><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Control Flow>esac</Control Flow><br/>
<Control Flow>case</Control Flow><Normal Text> pwd </Normal Text><Keyword>in</Keyword><Normal Text> </Normal Text><Keyword>(</Keyword><Pattern>patt1</Pattern><Keyword>)</Keyword><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Control>;</Control><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Control Flow>;;</Control Flow><Normal Text> </Normal Text><Keyword>(</Keyword><Pattern>patt</Pattern><Glob>*</Glob><Keyword>)</Keyword><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Control Flow>;;&</Control Flow><Normal Text> </Normal Text><Pattern>patt</Pattern><Glob>?</Glob><Keyword>|</Keyword><Pattern>patt</Pattern><Keyword>)</Keyword><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Control Flow>;&</Control Flow><br/>
<Pattern>patt</Pattern><Keyword>)</Keyword><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Control Flow>;;</Control Flow><Normal Text> </Normal Text><Control Flow>esac</Control Flow><br/>
<Normal Text></Normal Text><br/>
<Control Flow>for</Control Flow><Normal Text> name </Normal Text><Keyword>in</Keyword><Normal Text> a</Normal Text><br/>
<Normal Text> </Normal Text><OtherCommand>b</OtherCommand><Normal Text> c </Normal Text><Control>;</Control><br/>
<Control Flow>do</Control Flow><br/>
<Builtin>echo</Builtin><br/>
<Control Flow>done</Control Flow><br/>
<Normal Text></Normal Text><br/>
<Control Flow>case</Control Flow><Normal Text> a </Normal Text><Keyword>in</Keyword><br/>
<Normal Text>  </Normal Text><Pattern>a</Pattern><Escape>\(</Escape><Normal Text> </Normal Text><Keyword>|</Keyword><Normal Text> </Normal Text><Pattern>b</Pattern><Glob>*</Glob><Pattern>c</Pattern><Glob>?</Glob><Normal Text> </Normal Text><Keyword>)</Keyword><Normal Text> </Normal Text><Builtin>echo</Builtin><br/>
<Normal Text>  </Normal Text><Keyword>(</Keyword><OtherCommand>b</OtherCommand><Variable>$c</Variable><Keyword>)</Keyword><Normal Text> </Normal Text><Comment># no pattern</Comment><br/>
<Normal Text>  </Normal Text><Control Flow>;;</Control Flow><br/>
<Normal Text>  </Normal Text><Keyword>(</Keyword><Pattern>b</Pattern><Variable>$c</Variable><Keyword>)</Keyword><Normal Text> </Normal Text><Control Flow>;;</Control Flow><br/>
<Normal Text>  </Normal Text><Comment># no pattern</Comment><br/>
<Normal Text>  </Normal Text><Keyword>(</Keyword><Pattern>b</Pattern><Variable>$c</Variable><Keyword>)</Keyword><br/>
<Control Flow>esac</Control Flow><br/>
<Normal Text></Normal Text><br/>
<Control Flow>case</Control Flow><Normal Text> </Normal Text><String DoubleQ>"</String DoubleQ><Variable>$1</Variable><String DoubleQ>"</String DoubleQ><Normal Text> </Normal Text><Keyword>in</Keyword><br/>
<Normal Text> </Normal Text><String DoubleQ>"a"</String DoubleQ><Keyword>)</Keyword><Normal Text> </Normal Text><OtherCommand>run_a</OtherCommand><Control>|&</Control><OtherCommand>a</OtherCommand><Control Flow>;;</Control Flow><br/>
<Normal Text> </Normal Text><String DoubleQ>"b"</String DoubleQ><Keyword>)</Keyword><Normal Text> </Normal Text><OtherCommand>run_b</OtherCommand><Control Flow>;;</Control Flow><br/>
<Normal Text> </Normal Text><String DoubleQ>"c"</String DoubleQ><Keyword>)</Keyword><Normal Text> </Normal Text><OtherCommand>run_c</OtherCommand><Control Flow>;;</Control Flow><br/>
<Normal Text> </Normal Text><Glob>*</Glob><Keyword>)</Keyword><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><String DoubleQ>"Plase choose between 'a', 'b' or 'c'"</String DoubleQ><Normal Text> </Normal Text><Control>&&</Control><Normal Text> </Normal Text><Builtin>exit</Builtin><Normal Text> 1</Normal Text><Control Flow>;;</Control Flow><br/>
<Control Flow>esac</Control Flow><br/>
