shell to process text file