Another utility that I find helpful is tac. It’s like cat, but in reverse. You can use it to reverse the lines in a file.
tac
cat
$ cat foo.txt foo bar fizz buzz $ tac foo.txt buzz fizz bar foo
Oh, and also sort -R to shuffle lines in a file.
sort -R
One of my favorite things about Vim is that you can pipe out a portion of your file to these utilities. For example:
:'<,'> !sort -R :'<,'> !tr -d '[:lower:]'
This is a pretty comprehensive reference. It’s nice to see tutorials focused on real life usage rather than man-page usage. It even introduces xargs as a combinator. Nice work!
Another utility that I find helpful is
tac
. It’s likecat
, but in reverse. You can use it to reverse the lines in a file.Oh, and also
sort -R
to shuffle lines in a file.One of my favorite things about Vim is that you can pipe out a portion of your file to these utilities. For example:
This is a pretty comprehensive reference. It’s nice to see tutorials focused on real life usage rather than man-page usage. It even introduces xargs as a combinator. Nice work!