>, which directs an output into a file, there is also
>>, which appends the file, or, in other words, adds stuff to the end of the file.
wcis used to count characters, words and lines.
wc -lcounts lines only.
uniqeliminates repeated lines (outputs the file with adjacent identical lines collapsed to one). It only works when repeated lines come together in a single continuous block. Example:
sort file.txt | uniq
>to redirect an output into a file (e.g.
ls /var/logs > logs.txt)
<to redirect a file (e.g.
sort < names.txt)
|to connect two commands with a pipe (e.g.
ls | grep)
The Hexlet support team or other students will answer you.
Programming courses for beginners and experienced developers. Start training for free
Our graduates work in companies:
Sign up or sign in