A nice use of the ! command in vim, is if you have a text files with lines and you want to sort it; do this, in command mode:
!Gsort
The ! command can also sort just a range of lines (in place, in the file), which can be even more useful. The range can be selected either by start and end line numbers, as in the parent comment's 2nd example, or by start and end marks (set by ma, mc, etc.) or even by a combination of the two, e.g. starting line number, end mark:
:'a,'b!sort
:123,'b!sort
Another example - turn a list of constant definitions in your code, into uppercase:
Gsort is cool! I usually defer to my blunt instrument approach of just doing ! sort. Vim is one of the few tools that keeps rewarding me more and more, the longer I use it.
, so for the sort example I gave, too, you may not need to shell out to the external sort command. On the other hand, you may want to, since it has more functionality.
Plus, vim doesn't have every filter command that Unix does, so the ! command is still very useful.
Edit: After reading the OP, I realized that my example of uppercasing constant definitions, can be simpler with this vim command, which doesn't shell out to the tr command:
gUG
(uppercase U in the command, as opposed to the OP's use of guG - lowercase u).
!Gsort
The ! command can also sort just a range of lines (in place, in the file), which can be even more useful. The range can be selected either by start and end line numbers, as in the parent comment's 2nd example, or by start and end marks (set by ma, mc, etc.) or even by a combination of the two, e.g. starting line number, end mark:
:'a,'b!sort :123,'b!sort
Another example - turn a list of constant definitions in your code, into uppercase:
!Gtr [a-z] [A-Z]
And so on ...