Am 09.09.2010 20:25, schrieb Andrea Conti:
> Note however (this is the "it depends" part :) that piping does not
> affect whatever the programs might allocate or save internally: in your
> second example (which does not involve any disk writing in either case)
> "sort" needs to see the complete input before producing any output, so
> it will allocate enough memory to store it whether it is invoked alone
> or as part of a pipeline (in which case it will also stall the
> downstream pipeline section until the upstream pipe is closed).
> 

When you look closer at `sort`, it is actually a quite impressive tool.
It sorts in-memory for small amounts of data and switches to temporary
files for larger. It can even compress those files to save disk space.

And it is still faster than most "business-grade" software for importing
data into data warehouses.

Throw `cut`, `paste`, `join` and `grep` into the mix and you can build
your own relational database system based on shell scripts ;)

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to