In our current directory, we want to find the 3 files which have the least number of lines. Which command listed below would work?
wc -l * > sort -n > head -n 3
wc -l * | sort -n | head -n 1-3
wc -l * | head -n 3 | sort -n
wc -l * | sort -n | head -n 3
|
is used to connect the output from one command to the input of another. >
is used to redirect standard output to a file. Try it in the shell-lesson-data/molecules
directory!