0 of 16 lessons done
Course classroom
CompTIA Linux+ XK0-006

Day 3 of 15

Day 3 · The shell: redirection, pipes and text

Turn logs and sales lists into answers: redirection, pipes, variables and the Linux text tools.

⏱ 2 hours 🧪 18 terminal tasks ✅ 13 review questions 🔒 Part of the full course

By the end of this day you will be able to

  • Explain standard input, standard output and standard error, and redirect each one.
  • Chain commands with pipes, tee and xargs to solve a problem in a single line.
  • Create variables and aliases, change the PATH and make them persistent in ~/.bashrc or ~/.profile.
  • Filter and transform text with grep, regular expressions, cut, sort, uniq, tr, sed and awk.
  • Compare files with diff and sdiff, number lines with nl, format output with printf, calculate with bc and check the kernel and architecture with uname.
  • Edit files with nano and with vi/vim using the essential shortcuts.

Topics

  • stdin, stdout and stderr
  • >, >>, 2>, 2>&1, &>, <, <<, <<<
  • Pipes, tee and xargs
  • Variables, export, env and PATH
  • alias, ~/.bashrc and ~/.profile
  • grep, regular expressions, sed and awk
  • cut, sort, uniq, tr, wc, head, tail
  • diff, sdiff and nl
  • printf, bc and uname
  • nano and vi/vim

This lesson is part of the full course

It includes the full explanation, 18 terminal tasks that check themselves and 13 review questions. If you already bought the course, sign in and pick up where you left off.

Full course: $99 (regular price $149) · one payment · 12 months of access

Already paid? Sign in with the email you used to buy: we send you a 6-digit code, no password.

Want to try it first? Take a free trial of the course. Questions? Message us on WhatsApp.

Loading your lesson…

Go to the course classroom

See all the lessons in the course

The companies, people and data in the course stories are fictional; any resemblance to reality is coincidental.