Replaced grep with sed, using only sed & tr commands now