Content deleted Content added
Restored revision 1307850819 by Blush30720 (talk): Misleading edit summaries, content is being added - not just moved. please see article Talk |
Blush30720 (talk | contribs) →Definitions: Add subsection on hashtag Comments back in Tag: Reverted |
||
Line 446:
[x] Terminal emulator as separate from shell
-->
This functionality is provided by a program called [[GNU Readline]] and is available in interactive mode only.
Certain keypress combinations allow a user to operate Bash to use tab completion and to search the command history.
Line 496 ⟶ 498:
| website = hypexr.org
}}</ref>
=== Comments ===
<!-- Important concepts:
[x] Comments
[x] Inline comments
-->
Comments can be a valuable way of clarifying information or explaining a script or source file to someone else who might not be familiar with the scripter's intentions or context.
Standard comments in Bash are denoted with a hashtag character: {{char|#}}.
Any text to the right of the hashtag to the end of the line will be ignored.
Inline comments are allowed, but hashtag comments will not print during debugging. See also: {{section link||xtrace}}.
:<syntaxhighlight lang="console">
$ echo '<foo>' # An inline hashtag comment occurs on the same line as a command
<foo>
$ # A regular comment (no output)
$
</syntaxhighlight>
=== Syntax <span class="anchor" id="Syntax"></span><span class="anchor" id="Tokens"></span><span class="anchor" id="Metacharacters"></span><span class="anchor" id="Operators"></span><span class="anchor" id="Words"></span><span class="anchor" id="Names"></span> ===
Line 660 ⟶ 682:
All data is stored in memory as a string.
Beginnning a word with a dollar character signifies that the word is the name of a variable or array.
Surrounding the dollar / variable name syntax in double quotes is always advised.
|