Here Document in Shell
Level 4108 keystrokes
A here document passes multi-line text to a command. With the unquoted delimiter EOF, ${USER} is expanded and the text is written to config.txt; with the quoted 'LITERAL' the text is used as is, so only "$USER stays literal" is printed.
Shell code
# Unquoted EOF: ${USER} is replaced by the user name# > sends the three lines to config.txt instead of the screen1cat <<EOF > config.txt2host=localhost3port=80804user=${USER}5EOF# Quoted delimiter: nothing is expanded, so cat prints "$USER stays literal" as written6cat <<'LITERAL'7$USER stays literal8LITERALOutput
$USER stays literal
Practice typing this code. Results are not recorded in the rankings.
Symbols in this code
The symbols you type in this Shell code and how often they appear.
<× 4=× 3'× 2$× 2.× 1{× 1}× 1>× 1