Shell-Skript How-To (Linux): Unterschied zwischen den Versionen

Aus MattWiki
(Die Seite wurde neu angelegt: „Diese Seite erläutert, wie verschiedene Aufgabenstellungen in Linux umgesetzt werden können. === Backquote === Backquote bezeichnet das folgende Symbol: ``…“)
 
Keine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
Diese Seite erläutert, wie verschiedene Aufgabenstellungen in Linux umgesetzt werden können.
Diese Seite erläutert, wie verschiedene Aufgabenstellungen in Linux umgesetzt werden können.
== Quotes ==
=== Single Quotes vs. Double Quotes ===
Merksätze zur Erläuterung:
<blockquote>
''Single'' quotes are ''simple'' quotes, with a ''single'' standard: every character is literal.
''Double'' quotes have a ''double'' standard: some characters are literal, others are still interpreted unless there's a backslash before them.
''Single'' quotes work alone: backslash inside single quotes is not special.
''Double'' quotes pair up with backslash: backslash inside double quotes makes the next character non-special.
The double quotes double the fun
expanding parameters one by one.
Double-quotes (") don't exactly mean what the say, for example a tool that says "quality" equipment is probably the opposite.
Single-quotes(') are strong quotes, what is between them is exactly what it seems.
</blockquote>
Quelle: https://unix.stackexchange.com/questions/400447/whats-a-good-mnemonic-for-shell-double-vs-single-quotes/400449


=== Backquote ===
=== Backquote ===

Version vom 29. November 2019, 10:39 Uhr

Diese Seite erläutert, wie verschiedene Aufgabenstellungen in Linux umgesetzt werden können.

Quotes

Single Quotes vs. Double Quotes

Merksätze zur Erläuterung:

Single quotes are simple quotes, with a single standard: every character is literal. Double quotes have a double standard: some characters are literal, others are still interpreted unless there's a backslash before them.

Single quotes work alone: backslash inside single quotes is not special. Double quotes pair up with backslash: backslash inside double quotes makes the next character non-special.


The double quotes double the fun expanding parameters one by one.


Double-quotes (") don't exactly mean what the say, for example a tool that says "quality" equipment is probably the opposite.

Single-quotes(') are strong quotes, what is between them is exactly what it seems.


Quelle: https://unix.stackexchange.com/questions/400447/whats-a-good-mnemonic-for-shell-double-vs-single-quotes/400449


Backquote

Backquote bezeichnet das folgende Symbol: ``

Verwendet man Backquote in Skripten, wird zunächst der Inhalt des Backquote ausgeführt, und das Ergebnis an das Skript zurückgegeben.

Alternative Notation: $()

Quelle: https://linuxwiki.de/Backquote