Accenture Interview Question

how to remove header and footer from text files using spark