Literal and Expanded
Easy · Quoting · Quoting · Variables
Problem
Print the text $HOME on the first line, and the value of $HOME on the second.
This is the whole of shell quoting in one problem: single quotes hand the shell a literal string, double quotes let it substitute.
Examples
Input: HOME=/home/user Output: $HOME /home/user
Approaches
- Single then double quotes
Related problems
Start free on Cariara · Coding problems · System design studio