That depends on what the end idea will be.
My first thought was to use Shell (bash), the second was Python.
But my thoughts are dark, pure evil and madness.