Make better use of sed