Processing Lines
Processing Lines
Processing Lines
We mentioned four commands that process lines: cut, tr, uniq and sort.
The cut command will split the line by some given parameter. You can define
that parameter with the d option.
The f option will then define which piece of data you want to take, after the line
splitting.
tr stands for translate. It will literally replace characters. The first argument are
the characters you want to replace and the second argument are the ones you
want to replace them with.
uniq command will only leave the unique lines.
sort will sort the lines by numbers or the alphabet.