Horje
bash quotes Code Example
bash quotes
# Short answer:
# Single quotes don't allow interpolation, but double quotes do

# Long answer:
# From wikipedia:
# In computer programming, string interpolation (or variable interpolation,
# 	variable substitution, or variable expansion) is the process of evaluating
# 	a string literal containing one or more placeholders, yielding a result in
# 	which the placeholders are replaced with their corresponding values.

# Concrete example:
echo "$(echo 'word')" # here, "$(echo 'word')" gets interpolated (interpreted)
--> word

echo '$(echo "word")' # here, '$(echo "word")' is echoed literally (no interpolation)
--> $(echo "word")

# Note, this link also has some good info:
https://stackoverflow.com/questions/10067266/when-should-i-wrap-quotes-around-a-shell-variable/42104627#42104627
bash get text inside quotes
# <command which return text containing quotes> | cut -d \" -f2
VBoxManage list vms | cut -d \" -f2




Shell

Related
tinker lost color cli Code Example tinker lost color cli Code Example
open local files wsl Code Example open local files wsl Code Example
yarn upgrade typescript Code Example yarn upgrade typescript Code Example
linux how to undeo ctrl+z Code Example linux how to undeo ctrl+z Code Example
ubuntu server does not run scripts Code Example ubuntu server does not run scripts Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11