There's a misunderstanding at work here about how Haskell actually regards side effects. In a few words: It provides an API for declaring side effects, and forces you to use this API when chaining them together, but it does not refuse to acknowledge their existence.
Haskell's reputation exaggerates how this API was less powerful, or missing altogether, in early versions of the language. But its reputation is not what you write programs in.
No misunderstanding. I know Haskell, and I do like it. But monads (each one) are better constrained to a small part of your code, otherwise you negate all the power you gain by declaring the side effects. And the entire point of a shell is to do IO all over the place.
Functional languages are all about keeping side effects under control so that you can tell what will and what will not change the state of the system. Think of it as incorporating awareness of program state into the type-system of the language.
neither `grep`, nor `sort` should have any side effects, and if they do, then you have potential for weird bugs later on. (imagine your / is mounted read only, and sort has a side effect of writing everything to a temp file. now suddenly this otherwise sane looking chain stops working).
In the command, you have a single input, and a single output (which has a specific mode, append). Those are the only IO functions which you've specified, but you have no guarantee that anything else will not make a mess of things.
The dream for "pure functional" shell scripting would be where the side effects are more obvious, and controllable, not to eliminate them.
Except that usually grep and sort can read files, or entire directories, which is considered a "side effect" in Haskell.
(Not to mention checking locales to decide how to sort, checking if the output is terminal so that we can add colors, but only if the environment variable says so, and on, and on...)
You can write C in Haskell (I do sometimes, for SPOJ or something) if you really want. However, Haskell lets you say that something has no side effects, which is very useful for reasoning about programs.