parses arguements and grep results