Results for “quote”
Small, practical examples. Search by task or narrow things down below.
Clean up a temporary directory automatically
Use an EXIT trap so temporary files are removed when the script ends.
mktemp✓ Tested
Escape text for HTML content
Python: Use html.escape before placing plain text in an HTML text or quoted attribute context.
Python✓ Tested
Extract a delimited text column
Linux Commands: Use cut for simple unquoted delimiter-separated text.
Linux Commands✓ Tested
Extract a JSON field
Read a scalar value from JSON text.
json_extract✓ Tested
Forward all arguments without changing their boundaries
Bash Scripts: Quoted at-sign preserves empty arguments and embedded spaces.
Bash Scripts✓ Tested
Insert values into a multiline template
PowerShell: A double-quoted here-string expands variable references.
PowerShell✓ Tested
Join array items with a one-character separator
Bash Scripts: A local IFS controls the separator used by the quoted star expansion.
Bash Scripts✓ Tested
Loop over an array safely
Preserve spaces in array elements while iterating.
array✓ Tested
Pass an environment variable
Supply configuration without changing an image.
environment✓ Tested
Prepend items while preserving existing array values
Bash Scripts: Construct a new array with the new values before the quoted original expansion.
Bash Scripts✓ Tested
Prevent a variable value from expanding as a filename pattern
Bash Scripts: Quote a variable to pass its literal contents even when matching filenames exist.
Bash Scripts✓ Tested
Remove a trailing carriage return from a line
Bash Scripts: Use an ANSI-C quoted carriage return as the suffix pattern.
Bash Scripts✓ Tested