Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
FOO="Hello world!"
echo "The value of variable 'FOO' is \"$FOO\""   # Escape the double quotes inside double quotes
echo "The value of variable 'FOO' is"' "$FOO"'   # Single-quoted text after double-quoted text
echo 'The value of variable 'FOO' is "$FOO"'     # Two single-quoted strings along with unquoted text FOO


Tip

If you see the greater than ( > ) character after pressing Enter, it can mean that your quotes are not paired, and the shell is waiting for more input to contain the missing quote of the pair (either single or double). Just use Ctrl-c to get back to the prompt.

...

backtick ( ` ) evaluation quoting is one of the underappreciated wonders of Unix.

The shell:

  • evaluates the expression/command inside the backtick marks ( ` )
  • the standard output of the expression replaces the text inside the backtick marks ( ` )

...

So what's this standard error stream? Recall our discussion of Command input errors? Well, error information is written to standard error, not to standard output!

...

Navigation and operations in nano are similar to those we discussed in Command line editing.

You can just type in text, and navigate around using arrow keys (up/down/left/right). A couple of other navigation shortcuts:

...