Courses / Beginner
The Linux Command Line
Navigate, search and automate from the terminal: pipes, permissions, processes and your first shell scripts.
8 lessons6 hours244k learnersCertificate with Pro
Code you'll write
# The ten most common words in a book
tr -cs 'A-Za-z' '\n' < book.txt | tr 'A-Z' 'a-z' \
| sort | uniq -c | sort -rn | head -10
#!/bin/sh
# Back up a folder with today's date in the name
src="$HOME/notes"
dest="$HOME/backups/notes-$(date +%F).tar.gz"
tar -czf "$dest" "$src" && echo "Saved $dest"