Append to File in Shell

Level 236 keystrokes

>> appends output to a file without overwriting existing content.

Shell code

# $(date) is replaced by the output of date (command substitution)
# >> appends the line to log.txt, creating it if needed; > would overwrite it
1echo "Log entry: $(date)" >> log.txt
Practice typing this code

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.

  • "× 2
  • >× 2
  • :× 1
  • .× 1
  • (× 1
  • )× 1
  • $× 1

More Shell examples at level 2

← Shell typing practice