sed is not always available in /bin, so stop using it and use shell syntax.