Use system grep to process file instead of Elif