It's much more efficient to code such content processing in a webscript that will use all of Alfresco powerful content processing features. Though if you want to use existing Windows or Linux command line tools (awk…), Alfresco ships with such a CLI wrapper (used with Image Magick for image transformations), but there's some coding to do.
What kind of command line tools would you like to run on content exactly ?
I needed to parse fields from a .doc Word file. I tried to convert file to .txt using Alfresco, but not too happy with results. Considering using other tools, but most of these are command line tools.
Take a look at Alfresco Content Transformation service: http://wiki.alfresco.com/wiki/Content_Transformations. Some of them do use command line tools to convert between document formats. You can configure a custom transformation and call this from within Alfresco.