This article illustrates using the *nix commandline to chain several commands together to automate a repetitive task - in this case preparing some drupal modules into neatly labelled directories.
The example here covers quite a few different useful commands and commandline techniques, which we can't really hope to cover in exhaustive detail; there's plenty of good documentation out there for everthing we mention.