implemented cat and grep